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'm new to this so please bear with me.

As I understand, it's like this, correct me where I'm wrong:

So i just edit the default config in /etc/nginx/sites-available/default and use it right away. Now I want to host more than 1 site on the server. I'm gonna need to do these steps below:

  • make a copy of default file with the name mydomain.com in the same directory.
  • create a subfolder mydomain.com in www and move all the files to it.
  • update the root var: root /var/www/mydomain.com;
  • create a symlink to sites-enabled ln -s /etc/nginx/sites-available/mydomain.com /etc/nginx/sites-enabled/mydomain.com
  • restart nginx afterward.

Are these the correct steps?

share|improve this question

migrated from webmasters.stackexchange.com Feb 27 '13 at 2:43

This question came from our site for pro webmasters.

Sounds fine to me. It takes less time to actually do it than it did for you to write this question. :) –  Michael Hampton Feb 27 '13 at 3:28
Well i'm just afraid if sth might go wrong as i'm new to this. –  Tuan Anh Tran Feb 27 '13 at 5:18
That's why you try it on a test system first. –  Michael Hampton Feb 27 '13 at 5:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.