By tgoolsby
I am trying to install two instances of Ghost at two different subdomains: one.example.com, two.example.com. I followed this guide to setup multiple Ghost instances: https://www.digitalocean.com/community/tutorials/how-to-serve-multiple-ghost-blogs-on-one-vps-using-nginx-server-blocks
When I visit one.example.com, the blog loads. However, when I visit two.exmaple.com or www.example.com, I get the vanilla nginx page. Whether or not I have the server block for ghost two enabled, two.example.com goes to the nginx page.
I tried removing all server blocks from conf.d and sites-enabled. In this case, one.example.com gives me the Unable to Connect page on Firefox. the www and two subdomains still go to the nginx page.
My Zone file is:
example.com. 1800 IN A 0.0.0.0
www.example.com. 1800 IN CNAME example.com.
one.example.com. 1800 IN CNAME example.com.
two.example.com. 1800 IN CNAME example.com.
Furthermore, If the only file I have in sites-enabled is
server {
listen 80;
server_name two.example.com;
location / {
proxy_set_header HOST $http_host;
proxy_pass http://127.0.0.1:2368;
proxy_redirect off;
}
}
then one.example.com will load ghost page, and two will load nginx page. In this case, the url in ghost/config.js is set to http://two.example.com 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.
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!
Problem solved. Firefox wasn’t refreshing the cache sometimes. I forced it to check for outdated cache every time the page loads.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.