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

/opt/nginx/

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

1 Answer 1

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

 
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.