Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 was under the impression that installing nginx on debian would create for me these two directories:

  • /etc/nginx/sites-available/
  • /etc/nginx/sites-enabled/

Is it right that these are not created automatically, and is it also correct that I should create these manually and put my conf file in there to have it read?

share|improve this question
Exactly how did you install nginx? – Michael Hampton Mar 3 '14 at 17:47
apt-get install nginx – Jimmy Mar 3 '14 at 23:13
up vote 1 down vote accepted

You can create these manually, than keep all of your virtual hosts files in sites-available and make symlinks to them in sites-enabled.

For this to work, you'll need to add include /your/nginx/conf/dir/sites-enabled/* to your nginx config in the http section.

I believe apache works similarly, it just has ensite/dissite commands to make things smoother.

And yes, it's not clear if the directories should be set up for you automatically as it is. The package from the repositories probably should do that. To see for yourself, take a look at this question here

share|improve this answer

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.