Subdomains setup for Nginx

  • Posted December 15, 2013


I have a weird issue trying to configure my domain + subdomain web applications. DNS config: First virtual host config: Second virtual host config: and work as they are intended. However uses the same web application as two above.

Why does is addressed to first virtual host?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Yeah, the subsomain site was activated, but it had syntax error in it, that’s why it didn’t started. <br>Thank you for the help.

On Ubuntu (not sure how it’s done in CentOS), one would “activate” the subdomain by creating a symbolic link for the subdomain-config file in <code>/etc/nginx/sites-enabled</code>. Did you do the equivalent on your VPS? <br> <br>Otherwise, you may want to check out <a href=“”>How To Set Up nginx Virtual Hosts (Server Blocks) on CentOS 6</a>.