Report this

What is the reason for this report?

How do I configure my subdomain for nginx and digitalocean?

Posted on August 21, 2014

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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.