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?

1 Answer 1

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.

1
  • 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, 2010 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .