Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have installed nginx 1.0.3 using the following procedure:

apt-get install libpcre3-dev build-essential libssl-dev
cd /opt/
tar -zxvf nginx-1.0.3.tar.gz
cd /opt/nginx-1.0.3/
./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module
make install
adduser --system --no-create-home --disabled-login --disabled-password --group nginx

The installation seems ok. I then need to create 2 virtual hosts but I cannot find any "nginx/sites-available" folder in /etc. nginx is only located in /opt (where I installed it) and so sites-available/enabled anywhere.

I will end up adding the virtualhost in the /opt/nginx/conf/nginx.conf but this is not what I want to do.

Can somebody help ?

share|improve this question
up vote 0 down vote accepted

All you need is to create two directories (/etc/nginx/sites-available & /etc/nginx/sites-enabled) and add following line to http section of nginx.conf

include /etc/nginx/sites-enabled/*;
share|improve this answer
I created my virtual hosts in nginx.conf. I will move them to seperate folders with the includes. Thanks. – Luc Jun 1 '11 at 21:36

Your Answer


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.