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 installed nginx using the phusion passenger installer, and it installed nginx in:


It has a config file in /opt/nginx/confg/nginx.conf and doesn't seemed to come with the sites-available and enabled folders.

I don't like how the nginx.conf file gets so big, is it possible to break the file out so each website has its own config file?

share|improve this question
up vote 4 down vote accepted

in my nginx.conf [debian, old nginx 0.6.32] i have:

http {

include /etc/nginx/sites-enabled/*;


files in sites-enabled [or symlinks] contain:

server {
  access_log  /var/log/nginx/whatever-access.log;

  location / {
    root   /var/www/whatever;
    index  index.html index.htm;

and more if needed.

share|improve this answer
ok so I just create a sites available, have the configs in their, then create a sites-enabled, and make them symbolic links linking to sites-available. seems easy enough in theory! – Blankman Nov 28 '10 at 20:28

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.