0

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?

Jimmy
  • 239
  • 3
  • 7
  • 21

1 Answers1

1

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

Roman Grazhdan
  • 334
  • 3
  • 15