The original post: /r/nginx by /u/TheRealLifeboy on 2024-07-06 10:36:24.
I set up the following nginx config on Ubuntu 20.04 in /etc/nginx/sites-enable/mmonit.imb.co.
server {
server_name mmonit.imb.co;
# root /var/www/html;
try_files $uri/index.html $uri u/mmonit;
location / {
proxy_pass http://mmonit.imb.co:9050;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mmonit.imb.co/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mmonit.imb.co/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbotmmonit.imb.co
}
server { if ($host = mmonit.imb.co) { return 301 https://$host$request_uri; } # managed by Certbot
listen 80;
server_name mmonit.imb.co;
return 404; # managed by Certbot
}
The site times out when go to https://mmonit.imb.co.
If I remove the root directive, it always displays the default nginx page. Even if I remove the bulk of the proxy_set directives, it still only gives me the default page.
What is wrong with this setup? http://mmonit.imb.co:9050 works perfectly from an edge browser, but due to a bug (I suspect) in both of the latest Firefox and Chromium based browsers it is not possible to turn https redirection off. (I can turn it off in the settings, but it has no effect). That is why I have resorted to just setting up an https reverse proxy to access mmonit.
You must log in or register to comment.