Nginx server block works for one subdomain but not the other.

I am trying to install two instances of Ghost at two different subdomains:, I followed this guide to setup multiple Ghost instances:

When I visit, the blog loads. However, when I visit or, I get the vanilla nginx page. Whether or not I have the server block for ghost two enabled, goes to the nginx page.

I tried removing all server blocks from conf.d and sites-enabled. In this case, gives me the Unable to Connect page on Firefox. the www and two subdomains still go to the nginx page.

My Zone file is: 1800 IN A 1800 IN CNAME 1800 IN CNAME 1800 IN CNAME

Furthermore, If the only file I have in sites-enabled is

server {
    listen 80;

    location / {
        proxy_set_header HOST $http_host;
        proxy_redirect off;

then will load ghost page, and two will load nginx page. In this case, the url in ghost/config.js is set to and the port is set to 2368.

I’m using node v4.2.4 and nginx 1.4.6 on Ubuntu. I installed these manually following the tutorial, but I guess I missed something somewhere and I can’t figure out where.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Problem solved. Firefox wasn’t refreshing the cache sometimes. I forced it to check for outdated cache every time the page loads.