Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Nginx was installed from Repository. Initially, it was working fine. However, I un linked default conf file in sites-enabled and added new virtual hosts file in sites-available folder and linked it using ln -s. nginx -t passes after restarting but it does not listen on port 80.

However if i copy the actual virtual hosts file in sites-enabled folder. After restart,it works once again. On a side note, same happens for default virtual hosts file. Here is the out put of ls -lR for nginx diretory

.:
total 60
drwxr-xr-x 2 root root 4096 Nov  3 03:38 conf.d
-rw-r--r-- 1 root root  898 Nov  3 03:06 fastcgi_params
-rw-r--r-- 1 root root 2258 Nov  3 03:06 koi-utf
-rw-r--r-- 1 root root 1805 Nov  3 03:06 koi-win
-rw-r--r-- 1 root root 2085 Nov  3 03:06 mime.types
-rw-r--r-- 1 root root 5287 Nov  3 03:06 naxsi_core.rules
-rw-r--r-- 1 root root  287 Nov  3 03:06 naxsi.rules
-rw-r--r-- 1 root root 2123 Dec 30 17:16 nginx.conf
-rw-r--r-- 1 root root  131 Nov  3 03:06 proxy_params
-rw-r--r-- 1 root root  465 Nov  3 03:06 scgi_params
drwxr-xr-x 2 root root 4096 Dec 30 17:29 sites-available
drwxr-xr-x 2 root root 4096 Dec 30 17:29 sites-enabled
-rw-r--r-- 1 root root  532 Nov  3 03:06 uwsgi_params
-rw-r--r-- 1 root root 3071 Nov  3 03:06 win-utf

./conf.d:
total 0

./sites-available:
total 4
-rw-r--r-- 1 root root 102 Dec 30 17:29 default

./sites-enabled:
total 0
lrwxrwxrwx 1 root root 23 Dec 30 17:29 default -> sites-available/default
share|improve this question
    
Please post the output of 'ls -lR /etc/nginx' command –  sendmoreinfo Dec 27 '12 at 20:11
    
kindly see the directory listing of nginx, i guess it has to do something with default file permissions –  Umair Bussi Dec 30 '12 at 12:37
add comment

1 Answer 1

up vote 1 down vote accepted

Permissions are fine, but symbolic link is broken -- it should point to ../sites-available/default

share|improve this answer
    
thanks, my bad. i also got it figured by comparing the directory listing output of default installation and my way of linking files :) –  Umair Bussi Dec 30 '12 at 17:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.