I have a successful nodebb setup working with my IP at http://5.35.243.92:4567.
When I try to access the forum with the generic hostname (http://lvps5-35-243-92.dedicated.hosteurope.de:4567) though, I get
Looks like your connection to NodeBB was lost, please wait while we try to reconnect."
Very similar to this problem:
https://community.nodebb.org/topic/10396/connection-lost
When going to the login page and trying to log in, upon hitting the "Submit" button, I get:
Login failed.
Your login was not successful. Your session might have expried. Please try again.
(freely translated from German)
So I recon my problem is happening somewhere in the nodebb config.
My working config is:
{
"url": "http://5.35.243.92:4567",
"secret": "d68e...",
"database": "redis",
"port": [
"4567",
"4568",
"4569"
],
"redis": {
"host": "127.0.0.1",
"port": "6379",
"database": "0"
}
}
So now I would like to do this:
{
"url": "http://lvps5-35-243-92.dedicated.hosteurope.de:4567",
"secret": "d68e2..."
}
After stopping and starting nodebb, I browse to
http://lvps5-35-243-92.dedicated.hosteurope.de:4567/
And I get 403 forbidden - Permission denied when trying to login with my credentials.
And the website reports the same problem as above:
Login failed [...] Session expired.
The log entry for the login request seems to be:
2017-12-10 16:23:11 Error 31.16.249.122 403 POST /login?error=csrf-invalid HTTP/1.1
Any ideas are greatly appreciated.
edit:
Ultimately I will need the forum to run with the actual domain: https://schreibnacht.de
So instead of getting it to run with the generic hostname, making it work with the schreibnacht domain would be even more appreciated.
For the schreibnacht.de domain I get:
/index.html Not found
This page does not exist. Return to homepage.
When browsing to https://schreibnacht.de/
And a
This site canβt be reached
schreibnacht.de unexpectedly closed the connection.
ERR_CONNECTION_CLOSED
When browsing to https://schreibnacht.de:4567
With the nodebb configuration
{
"url": "https://schreibnacht.de",
"secret": "d68e...",
"database": "redis",
"port": [
"4567",
"4568",
"4569"
],
"redis": {
"host": "127.0.0.1",
"port": "6379",
"database": "0"
}
}
And an nginx proxy configured 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 X-Forwarded-Proto $scheme;
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";
}
Although the domain points to the same server as http://lvps5-35-243-92.dedicated.hosteurope.de. Shouldn't that mean that http://schreibnacht.de:4567 should deliver the same as http://lvps5-35-243-92.dedicated.hosteurope.de:4567?
Considering they should both not be picked up by the nginx because they use the open port directly?
Curiously, going to http://5.35.243.92:4567/ (IP directly with nodebb configured to "url": "https://schreibnacht.de") with this configuration, the page still shows up and does't display the "/index.html not found" problem. But it does report "You've been disconnected, please wait while we reconnect you."