2

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?

4

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.

| 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.