Double URL problem after login | https in config.json gives session error



  • @julian so I must exacly do this

    "url": "https://keen.wtf",

    in Nodebb/config.json



  • Did change it to "url": "https://keen.wtf", same error.

    Cleared cookies - same error
    Other browser - same error
    On the Phone - same error



  • Change the language to English so the error is in English. This I get when I try to login on phone (and other browsers).

    12c62806-cf39-49d9-b1cf-9953e281119a-image.png


  • GNU/Linux Admin

    Okay two things:

    1. Remove the listen 80; from the https block, it is unneeded.
    2. Add proxy_set_header X-Forwarded-Proto $scheme;, it seems to be missing.

    Then reload nginx and it should hopefully be gone.



  • @julian did this.

    did reload nginx now gonna check



  • Not working, same error 😞

    /etc/nginx/sites-enabled/keen.wtf.conf does look like this now

    server {
            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";
        }
    }
    
    
    
    
    

  • Staff Admin

    @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.



  • @baris I will do 🙂



  • Guys you helped me a lot 🙂 Thank you it's all fine now 😄


  • GNU/Linux Admin

    Great! 😄 Enjoy your NodeBB!


Log in to reply
 

Suggested Topics

| |