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.comin the same directory. - create a subfolder
mydomain.cominwwwand 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?