I am trying to deploy my Ghost application to Elastic Beanstalk, the issue I'm having is that I'm getting a 502 Bad Gateway nginx/1.6.2 error. What is strange is when I look at the /var/log/nginx/error.log I'm getting very strange hostnames that my server is trying to connect to. I'm not sure my next steps and I changed the port to 8081 to match with Elastic Beanstalks port. Any guidance?
2015/08/02 12:50:33 [error] 6668#0: *32956 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.25.100, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "delmar.instructure.com"
2015/08/02 13:14:33 [error] 6668#0: *33101 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.18.211, server: , request: "GET /rom-0 HTTP/1.1", upstream: "http://ift.tt/1MJJvSB", host: "52.7.78.240"
2015/08/02 13:15:58 [error] 6668#0: *33114 connect() failed (111: Connection refused) while connecting to upstream, client: 172.21.25.112, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "byuh.instructure.com"
2015/08/02 13:53:52 [error] 6668#0: *33342 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.25.112, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "delmar.instructure.com"
2015/08/02 13:55:02 [error] 6668#0: *33357 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.25.112, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "delmar.instructure.com"
2015/08/02 14:58:30 [error] 6668#0: *33736 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.39.211, server: , request: "GET /rom-0 HTTP/1.1", upstream: "http://ift.tt/1MJJvSB", host: "52.7.78.240"
2015/08/02 16:04:03 [error] 6668#0: *34138 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.25.112, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "delmar.instructure.com"
2015/08/02 16:19:06 [error] 6668#0: *34232 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.25.112, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "byuh.instructure.com"
2015/08/02 16:56:28 [error] 6668#0: *34458 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.25.112, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "loganschools.instructure.com"
Here is my config:
// # Ghost Configuration
// Setup your Ghost install for various environments
// Documentation can be found at http://ift.tt/1qiHjS5
var path = require('path'),
config;
var AWS_ACCESS_KEY = process.env.AWS_ACCESS_KEY;
var AWS_SECRET_KEY = process.env.AWS_SECRET_KEY;
config = {
// ### Production
// When running Ghost in the wild, use the production environment
// Configure your URL and mail settings here
production: {
url: 'http://www.website.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: '8081'
},
storage: {
active: 'ghost-s3',
'ghost-s3': {
accessKeyId: 'process.env.AWS_ACCESS_KEY',
secretAccessKey: 'process.env.AWS_SECRET_KEY',
bucket: 'gh-images',
region: 'us-standard',
assetHost: '//s3.amazonaws.com/gh-images/'
}
},
},
// ### Development **(default)**
development: {
// The url to use when providing links to the site, E.g. in RSS and email.
// Change this to your Ghost blogs published URL.
url: 'http://localhost:2368',
// Example mail config
// Visit http://ift.tt/XtVWvd for instructions
// ```
// mail: {
// transport: 'SMTP',
// options: {
// service: 'Mailgun',
// auth: {
// user: '', // mailgun username
// pass: '' // mailgun password
// }
// }
// },
// ```
database: {
client: 'sqlite3',
connection: {
filename: path.join(__dirname, '/content/data/ghost-dev.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'
},
paths: {
contentPath: path.join(__dirname, '/content/')
},
storage: {
active: 'ghost-s3',
'ghost-s3': {
accessKeyId: AWS_ACCESS_KEY,
secretAccessKey: AWS_SECRET_KEY,
bucket: 'ghost-blogpost-images',
region: 'us-east-1',
assetHost: '//s3.amazonaws.com/ghost-blogpost-images/'
}
}
},
// **Developers only need to edit below here**
// ### Testing
// Used when developing Ghost to run tests and check the health of Ghost
// Uses a different port number
testing: {
url: 'http://127.0.0.1:2369',
database: {
client: 'sqlite3',
connection: {
filename: path.join(__dirname, '/content/data/ghost-test.db')
}
},
server: {
host: '127.0.0.1',
port: '2369'
},
logging: false
},
// ### Testing MySQL
// Used by Travis - Automated testing run through GitHub
'testing-mysql': {
url: 'http://127.0.0.1:2369',
database: {
client: 'mysql',
connection: {
host : '127.0.0.1',
user : 'root',
password : '',
database : 'ghost_testing',
charset : 'utf8'
}
},
server: {
host: '127.0.0.1',
port: '2369'
},
logging: false
},
// ### Testing pg
// Used by Travis - Automated testing run through GitHub
'testing-pg': {
url: 'http://127.0.0.1:2369',
database: {
client: 'pg',
connection: {
host : '127.0.0.1',
user : 'postgres',
password : '',
database : 'ghost_testing',
charset : 'utf8'
}
},
server: {
host: '127.0.0.1',
port: '2369'
},
logging: false
}
};
// Export config
module.exports = config;
Aucun commentaire:
Enregistrer un commentaire