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 ?
All you need is to create two directories (
/etc/nginx/sites-available
&/etc/nginx/sites-enabled
) and add following line tohttp
section of nginx.conf