How to setup a Nginx website(How to Config Nginx Virtual Host)
This tutorial will show you How to setup a Nginx website(How to Config Nginx Virtual Host) with ComfortVPS Nginx Installation Service.
Step 1, Create a domain name directory under /www via SFTP, eg, yourdomain.com, subdomain.abc.com, domain-name.net
Step 2, Everything is Done, Config Nginx virtual host is finish, upload your php/html files to that directory then test it.
/www directory structure example via SFTP (Another tutorial: How to access SFTP?):
NOTE:
- Don't know how to connect to your SFTP? Here is another tutorial: How to access SFTP?
- Domain name directory DO NOT need www. eg, You want create a website www.comfortvps.com , just create directory comfortvps.com under /www via FTP, do not create www.comfortvps.com, then both domain name www.comfortvps.com and comfortvps.com will work.
- Subdomain, just trade as top domain, create a directory and works, eg, user.comfortvps.com, wiki.abc.com
- Alias domains, muti domains point a same website. eg, You already have comfortvps.com, and you want add another domain comfortvps.org to the same website. How to do that? Only 1 step to do that: SSH login your server, then run command "ln -s /www/comfortvps.com /www/comfortvps.org", done!