By nicholasfc
I’m having a hard time installing ghost on my droplet. The guides I found online seems to be missing something.
My droplet run ubuntu 14.04 LTS. I want to run ghost on a subdomain (blog.example.com) . I used the guide to here to add subdomains on nginx and got it working. I followed this guide http://www.howtoinstallghost.com/how-to-install-ghost-on-ubuntu-server-12-04/ until the part “configure ghost” . I changed the config.example.js file adding on the url “blog.example.com” but I left the host untouched.
Can anyone find me a guide that helps me install ghost on a subdomain using nginx that guide us through the whole process until it is working on port 80?
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!
Setting up Ghost to run on a subdomain behind an Nginx reverse proxy shouldn’t be much different than setting it up normally. The key is to set the server_name directive in your Nginx configuration file.
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name blog.example.com
root /usr/share/nginx/html;
index index.html index.htm;
client_max_body_size 10G;
location / {
proxy_pass http://localhost:2368;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}
}
You’ll also need to setup a DNS record pointing the subdomain to the server.
For all the details on setting Ghost up with Nginx, check out this tutorial:
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.