Subdomains on Ubuntu LTS 12.04 with ngnix and ghost

  • Posted June 17, 2014

So I had my droplet setup to point directly to a ghost installation I made during the configuration of the droplet. My DNS record is like this:

A @ my.ip.address CNAME * @

And the DNS records for DO

so if I went to my ghost blog would load.

Now I wanna make some changes, I would like to have a subdomain for example: that points to my ghost blog and leave a static html(or another type of content) to

I’m trying to follow this tutorial:

But it didn’t work, and I beleive it’s because I didn’t setup the DNS records properly and perhaps didn’t setup the permissions properly.

How can I setup a subdomain and keep my current ghost install?

Thanks for the time!


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.

Thanks for the info astarr

It finally worked, I had to tinker with nginx a bit since I hadn’t used it before, your config helped me, so for anyone looking to something like this here is my config file for nginx:

And just be wary of a couple of things: -Remember to run ghost again, I stopped the service and forgot to start it again. -Restart nginx to apply any config changes

Thanks for the help

Your DNS settings look fine. Now it’s a matter of getting your Nginx configuration right. You need to use the <code>server_name</code> directive. So your conf might look something like: <pre> server { listen 80; server_name ;

client_max_body_size 10M;

location / {
        proxy_pass http://localhost:2368/;
        proxy_set_header Host $host;
        proxy_buffering off;

} server { listen 80; server_name;

    root /var/www/;
    index index.html index.htm;

} </pre> Let us know how it goes!