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 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
1  
Exactly how did you install nginx? –  Michael Hampton Mar 3 at 17:47
    
apt-get install nginx –  Jimmy Mar 3 at 23:13

1 Answer 1

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

 
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.