• Anime Lovers

    @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
    

  • @departman said:

     -bash: cd: /etc/nginx/site-enabled: No such file or directory
    

    That is definetly wrong,

    Read it again, it's not. No need to run the mkdir command, as the folder may already exist.

  • Anime Lovers

    @a_5mith Ohh, yeah there is missing a s. My fault^^


  • Just do

    root@15:~# ln -sf /etc/nginx/sites-available/bikenode.com -T /etc/nginx/sites-enabled/bikenode.com 
    root@15:~# /etc/init.d/nginx restart
    

  • It's already linked up.

    root@15:~# cd /etc/nginx/sites-enabled
    root@15:/etc/nginx/sites-enabled# ln -s ../sites-available/bikenode.com 
    ln: failed to create symbolic link ‘./bikenode.com’: File exists
    

    Screen Shot 2014-11-22 at 1.34.30 PM.png


  • This post is deleted!

  • Yup.

    root@15:/etc/nginx/sites-enabled# service nginx restart
    * Restarting nginx nginx                                                [ OK ] 
    

    should it be saying nginx twice there in the second line??


  • The two nginx names are okay.
    What says ls -la /etc/nginx/sites-enabled ?
    Maybe a broken link. Nginx would(should XD) complain. But better check.


  • @termnml

    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
    
  • Anime Lovers

    @kevin yup thats broken and not your config. Delete this symlink and create it again.


  • @kevin said:

    @termnml

    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

    Ah 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
    Screen Shot 2014-11-22 at 1.57.25 PM.png


  • 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. 😉


  • @termnml

    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
    

  • And one more time to pastebin:
    cat /var/log/nginx/error.log


  • @termnml said:

    cat /var/log/nginx/error.log

    http://pastebin.com/FEFpnf00

    and the file: http://pastebin.com/C809hwn8


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



  • Glad to see. We won. 😎
    Don't forget to prepend your OP with [solved].

  • Anime Lovers

    @termnml said:

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

    Well there is no problem using relative links there. You would be also able to move the whole nginx directory somewhere else, without replacing the symlinks, if you would want to do so. Also I dont know when someone would want to do that, so it does not matter.

    However, gratz that its working now 🙂

Suggested Topics

| |