new topic replying to "{function.escape
-
@nhl.pl said:
Yes, I know. You have wrong configuration.
Mmmm yeah, if you look at the Digital Ocean advice given, it was me that asked that question, so my setting are already correct, - I think;
Though I don't have this in my nginx default file
server { listen 80; server_name ideocracycommunity.com; location / { proxy_pass http://localhost:4567; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
Mine looks like this;
server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { proxy_pass http://localhost:4567; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }
-
They do not know you're running NodeBB.
You can check user profile for tracked IP address. It will be localhost displayed as IP.
So you should also add this to your nginx config.
# Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
-
@nhl.pl said:
They do not know you're running NodeBB.
You can check user profile for tracked IP address. It will be localhost displayed as IP.
So you should also add this to your nginx config.
Sadly none of that has helped, I restarted nginx and Nodebb.
Just one final check for the default file, is this right?
# Make site accessible from http://localhost/ server_name localhost; location / { proxy_pass http://localhost:4567; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; }
Just out of interest how did you know I had the settings wrong?
-
Sorry, it's late here in GMT+1.
You should try a config from an experienced user and replace IP in proxy_pass with localhost.
https://community.nodebb.org/topic/4111/need-help-on-nginx-server-block/2Restart nginx, update & upgrade NodeBB, restart NodeBB, disable plugins for test purposes.
Bye, bye for now.
-
@nhl.pl said:
Sorry, it's late here in GMT+1.
You should try a config from an experienced user and replace IP in proxy_pass with localhost.
Bye, bye for now.Enjoy you're sleep
Ok well after a little investigation the line below can't be wrong, I tried a few alternatives and upon restarting nginx it failed throwing up an error "invalid URL prefix in /etc/nginx/sites-enabled/default:31"
proxy_pass http://localhost:4567;
The localhost:4567 proxy pass was the only one I was able to use and restart nginx with. So assuming default is right, I guess that means .json might be wrong instead?
{ "url": "http://wikievolved.org", "secret": "", "database": "redis", "redis": { "host": "127.0.0.1", "port": "6379", "password": "", "database": "0" } }
I know I'm a little dippy when it comes to Nodebb but shouldn't the port setting above be 4567, or should the nginx default file be 6379?
-
@nhl.pl said:
Could please post it here? I mean what you're trying to do with nginx config.
nginx default
# Make site accessible from http://localhost/ server_name wikievolved.org; location / { proxy_pass http://127.0.0.1:4567; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; }
config.json
{ "url": "http://wikievolved.org", "secret": "2", "database": "redis", "redis": { "host": "127.0.0.1", "port": "6379", "password": "", "database": "0" } }
@nhl.pl said:
You have wrong configuration.
In relation to;
- the new topic button not working
- Category pages not rendering/loading fully (requires a refresh after click to load)
- Fixing the TypeError: can't convert undefined to object error
- Fixing the mutating the [[Prototype]] of an object error
- Firefox can't establish a connection to the server at ws://wikievolved.org/socket.io/ error
-
@nhl.pl said:
Please look again on all those nginx conf files quoted by me and correct your own.
P.S. all your problems comes from wrong nginx configuration, lack of socket.io lines for example
Thanks for all you're help NHL, I'm gonna pay someone to solve these issues, I'm getting no-where fast, is very frustrating for my users, getting lots of complaints about not being able to post and too many emails to cope with cos the forums aren't working.