Double URL problem after login | https in config.json gives session error
-
this is the file
nginx/sites-enabled/keen.wtf.conf
server { listen 80; server_name keen.wtf; rewrite ^ https://$host$request_uri? permanent; } server { listen 80; listen 443 ssl; server_name keen.wtf; ssl_certificate /etc/letsencrypt/live/keen.wtf/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/keen.wtf/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot ssl_stapling on; ssl_stapling_verify on; add_header Strict-Transport-Security "max-age=31536000"; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:4567; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
-
Not working, same error
/etc/nginx/sites-enabled/keen.wtf.conf
does look like this nowserver { proxy_set_header X-Forwarded-Proto $scheme; server_name keen.wtf; rewrite ^ https://$host$request_uri? permanent; } server { listen 80; listen 443 ssl; server_name keen.wtf; ssl_certificate /etc/letsencrypt/live/keen.wtf/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/keen.wtf/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot ssl_stapling on; ssl_stapling_verify on; add_header Strict-Transport-Security "max-age=31536000"; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:4567; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
-
@MJ said in Double URL problem after login | https in config.json gives session error:
proxy_set_header X-Forwarded-Proto $scheme;
That should be in the location block I think, like this
location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://127.0.0.1:4567; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; }
See here for sample nginx configs.
Copyright © 2024 NodeBB | Contributors