Right! I’ve dumbly applied the config in the page listed above, compared to other nginx config files and couldn’t understand why the proxy wouldn’t listen to 80:443 for discourse…
Here’s what I expected to see:
server {
listen 80;
server_name discourse.mydomain.com;
return 301 https://$host$request_uri; # routing to https
}
server {
listen 443 ssl
listen [::]:443 ssl;
server_name discourse.mydomain.com;
ssl_certificate /etc/letsencrypt/live/discourse.mydomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/discourse.mydomain.com/privkey.pem;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
location / {
proxy_pass http://unix:/var/discourse/shared/standalone/nginx.http.sock:; # using socket
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
}
NPM: I’ve followed @pfaffman’s advide and read Using Nginx Proxy Manager to manage multiple sites with Discourse, so I’ve evaluated the option to install NPM, but this looks overkill…
Thanks to all for your help!