By dhtrinh02
Digital Ocean pre-build image : Ghost 0.5 on Ubuntu 14.04
I followed a few guides, but I can’t seem to get it to work correctly, what am I doing wrong? I want davedh2.com to host my personal site, and have blog.davedh2.com for my ghost blog.
my DNS: http://picpaste.com/pics/Screen_Shot_2014-08-21_at_1.45.40_PM-Nz9gcgnR.1408654168.png
my nginx/sites-available file
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name davedh2.com; # Replace with your domain
location / {
root /usr/share/nginx/davedh2;
index index.html index.htm;
}
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name blog.davedh2.com; # Replace with your domain
access_log /var/log/nginx/ghost.log
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;
}
}
my config.js
// ### Production
// When running Ghost in the wild, use the production environment
// Configure your URL and mail settings here
production: {
url: 'http://davedh2.com',
mail: {},
database: {
client: 'sqlite3',
connection: {
filename: path.join(__dirname, '/content/data/ghost.db')
},
debug: false
},
server: {
// Host to be passed to node's `net.Server#listen()`
host: '127.0.0.1',
// Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
port: '2368'
}
},
Thank you.
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!
Hey Andrew,
Yes, I did create the directory, and there is an index.html. I didn’t know that I had to execute the command service ghost restart, lol just found about it. Now, I can go back and forth within the blog, but I’m still unable to load my index.html from /urs/share/nginx/davdh2.
as for the config.js do you mean like this? Thank you.
// ### Production
// When running Ghost in the wild, use the production environment
// Configure your URL and mail settings here
production: {
url: ‘http://blog.davedh2.com’,
mail: {},
database: {
client: ‘sqlite3’,
connection: {
filename: path.join(__dirname, ‘/content/data/ghost.db’)
},
debug: false
},
server: {
// Host to be passed to node’s net.Server#listen()
host: ‘127.0.0.1’,
// Port to be passed to node’s net.Server#listen(), for iisnode set this to process.env.PORT
port: ‘2368’
}
},
production: {
url: 'http://davedh2.com',
mail: {},
database: {
client: 'sqlite3',
connection: {
filename: path.join(__dirname, '/content/data/ghost.db')
},
debug: false
},
server: {
// Host to be passed to node's `net.Server#listen()`
host: '127.0.0.1',
// Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
port: '2368'
}
},
// **Developers only need to edit below here**
That mostly looks right to me. Except if you want the Ghost blog on the subdomain, you should set it in config.js as well:
production: {
url: 'http://davedh2.com',
Does the directory /usr/share/nginx/davedh2 actually exist? Is there an index.html file there?
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.