nginx halp plskthx [solved]
-
@kevin Ok
-bash: cd: /etc/nginx/site-enabled: No such file or directory
That is definetly wrong, execute the following:
mkdir /etc/nginx/sites-enabled cd /etc/nginx/sites-enabled ln -s ../sites-available/bikenode.com . /etc/init.d/nginx restart
-
root@15:/etc/nginx/sites-enabled# ls -la /etc/nginx/sites-enabled total 8 drwxr-xr-x 2 root root 4096 Nov 22 04:21 . drwxr-xr-x 6 root root 4096 Nov 22 04:14 .. lrwxrwxrwx 1 root root 41 Nov 22 04:21 bikenode.com -> /etc/nginx/sites-available/yourAppUrl.com
-
@kevin said:
root@15:/etc/nginx/sites-enabled# ls -la /etc/nginx/sites-enabled
total 8
drwxr-xr-x 2 root root 4096 Nov 22 04:21 .
drwxr-xr-x 6 root root 4096 Nov 22 04:14 ..
lrwxrwxrwx 1 root root 41 Nov 22 04:21 bikenode.com -> /etc/nginx/sites-available/yourAppUrl.comAh okay. The link is wrong
root@15:# cd /etc/nginx/sites-enabled root@15:# rm ./bikenode.com root@15:# ln -sf /etc/nginx/sites-available/bikenode.com -T /etc/nginx/sites-enabled/bikenode.com root@15:# service nginx restart
-
Giving me issues...
root@15:/etc/nginx/sites-enabled# rm bikenode.com root@15:/etc/nginx/sites-enabled# ln -s ../sites-available/bikenode.com . root@15:/etc/nginx/sites-enabled# /etc/init.d/nginx restart * Restarting nginx nginx [fail] root@15:/etc/nginx/sites-enabled# ls -la /etc/nginx/sites-enabled total 8 drwxr-xr-x 2 root root 4096 Nov 22 16:54 . drwxr-xr-x 6 root root 4096 Nov 22 04:14 .. lrwxrwxrwx 1 root root 31 Nov 22 16:54 bikenode.com -> ../sites-available/bikenode.com
I can see the new link is in the folder
-
root@15:/etc/nginx/sites-enabled# rm bikenode.com root@15:/etc/nginx/sites-enabled# ln -sf /etc/nginx/sites-available/bikenode.com -T /etc/nginx/sites-enabled/bikenode.com root@15:/etc/nginx/sites-enabled# service nginx restart
Jear its not wise to use relative links there. Try this way.
-
root@15:/etc/nginx/sites-enabled# rm bikenode.com root@15:/etc/nginx/sites-enabled# ln -sf /etc/nginx/sites-available/bikenode.com -T /etc/nginx/sites-enabled/bikenode.com root@15:/etc/nginx/sites-enabled# service nginx restart * Restarting nginx nginx [fail] root@15:/etc/nginx/sites-enabled# ls -la /etc/nginx/sites-enabled total 8 drwxr-xr-x 2 root root 4096 Nov 22 16:59 . drwxr-xr-x 6 root root 4096 Nov 22 04:14 .. lrwxrwxrwx 1 root root 39 Nov 22 16:59 bikenode.com -> /etc/nginx/sites-available/bikenode.com
-
-
server { listen 80; server_name bikenode.com; 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; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
add a ; after proxy_set_header Connection "upgrade"
So it should look like the above now.
Copyright © 2024 NodeBB | Contributors