I’m trying to set up three different ghost blogs on one droplet. I have followed the instructions in the tutorial: https://www.digitalocean.com/community/tutorials/how-to-serve-multiple-ghost-blogs-on-one-vps-using-nginx-server-blocks but right now all my domain names are pointing to the same blog instance and I can’t seem to figure out where I have come wrong. I’ve attached the /etc/mginx/sites-enabled config files as well as the ghost/config files below. I’ve googled trying to find a solution but can’t seem to come up with anything.
domain 1 nginx config
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name rachelmfisher.com; # Replace with your domain
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;
}
}
domain 2 nginx config
server {
listen 80;
listen [::]:80;
server_name yougotalottanerve.com; # Replace with your domain
root /usr/share/nginx/html;
index index.html index.htm;
client_max_body_size 10G;
location / {
proxy_pass http://localhost:2369;
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;
}
}
domain 3 nginx config
server {
listen 80;
listen [::]:80;
server_name doombunnyctr.com; # Replace with your domain
root /usr/share/nginx/html;
index index.html index.htm;
client_max_body_size 10G;
location / {
proxy_pass http://localhost:2778;
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;
}
}
domain1 ghost/config.js
// Prepared via DigitalOcean 1-Click provisioning
// # Ghost Configuration
// Setup your Ghost install for various [environments](http://support.ghost.org/config/#about-environments).
// Ghost runs in `development` mode by default. Full documentation can be found at http://support.ghost.org/config/
var path = require('path'),
config;
config = {
// ### Production
// When running Ghost in the wild, use the production environment.
// Configure your URL and mail settings here
production: {
url: 'http://rachelmfisher.com',
mail: {},
database: {
// This part was prepared during first boot by DigitalOcean's 1-Click first-provisioning
// This section is unique to this droplet
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'ghost',
password : 'aec8989f6d573cb93a65c41dc0122ebe4118e1ae0104a534',
database : 'ghost',
charset : 'utf8'
// End of per-droplet configuration
},
debug: false
},
server: {
host: '127.0.0.1',
port: '2368'
}
},
domain2 ghost/config.js
// Prepared via DigitalOcean 1-Click provisioning
// # Ghost Configuration
// Setup your Ghost install for various [environments](http://support.ghost.org/config/#about-environments).
// Ghost runs in `development` mode by default. Full documentation can be found at http://support.ghost.org/config/
var path = require('path'),
config;
config = {
// ### Production
// When running Ghost in the wild, use the production environment.
// Configure your URL and mail settings here
production: {
url: 'http://yougotalottanerve.com',
mail: {},
database: {
// This part was prepared during first boot by DigitalOcean's 1-Click first-provisioning
// This section is unique to this droplet
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'ghost',
password : 'aec8989f6d573cb93a65c41dc0122ebe4118e1ae0104a534',
database : 'ghost',
charset : 'utf8'
// End of per-droplet configuration
},
debug: false
},
server: {
host: '127.0.0.1',
port: '2369'
}
},
domain3 ghost/config.js
// Prepared via DigitalOcean 1-Click provisioning
// # Ghost Configuration
// Setup your Ghost install for various [environments](http://support.ghost.org/config/#about-environments).
// Ghost runs in `development` mode by default. Full documentation can be found at http://support.ghost.org/config/
var path = require('path'),
config;
config = {
// ### Production
// When running Ghost in the wild, use the production environment.
// Configure your URL and mail settings here
production: {
url: 'http://doombunnyctr.com',
mail: {},
database: {
// This part was prepared during first boot by DigitalOcean's 1-Click first-provisioning
// This section is unique to this droplet
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'ghost',
password : 'aec8989f6d573cb93a65c41dc0122ebe4118e1ae0104a534',
database : 'ghost',
charset : 'utf8'
// End of per-droplet configuration
},
debug: false
},
server: {
host: '127.0.0.1',
port: '2778'
}
},
Any assistance would be greatly appreciated!
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!
I was actually about to comment on that – glad you were able to get that resolved!
One thing I would comment on is what you’ve exposed in the Ghost Configuration (your MySQL user and password). If those are valid connection details for your database, please make sure you change at least the password as it’s now exposed and would allow anyone to potentially attempt to connect.
is this still applicable today? 01-10-2018 we only have ‘config.production.json’ in the ghost folder with structure:
"url": "http://159.XXX.XX.XXX",
"server": {
"port": 2368,
"host": "127.0.0.1"
},
"database": {
"client": "mysql",
"connection": {
"host": "localhost",
"user": "ghost",
"password": "XXXXXXXXX",
"database": "ghost_production"
}
},
"mail": {
"transport": "Direct"
},
"logging": {
"transports": [
"file",
"stdout"
]
},
"process": "systemd",
"paths": {
"contentPath": "/var/www/ghost/content"
}
}
MySQL root password was stored at /root/.digitalocean_password for me, per info in MOTD message, which by the way didn’t display until after reboot and THEN the next SSH login.
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.