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.

I have installed nginx 1.0.3 using the following procedure:

apt-get install libpcre3-dev build-essential libssl-dev
cd /opt/
wget http://nginx.org/download/nginx-1.0.3.tar.gz
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
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

1 Answer 1

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

 
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.