【发布时间】:2014-01-26 22:09:57
【问题描述】:
我是 nginx、Ghost 和管理服务器的新手,如果不指定端口 :2368,我不知道如何让 ghost 运行
http://blog.ingledow.co.uk:2368 有效,但 http://blog.ingledow.co.uk 无效。
我的数字海洋水滴上有两个站点,/etc/nginx/sites-enabled/ 中有两个 .conf 文件。这些是ghost.conf 和ingledow.co.uk
顺便说一下,/etc/nginx/conf.d/ 目录是空的。
Ghost 的 config.js
// ### Production
// When running Ghost in the wild, use the production environment
// Configure your URL and mail settings here
production: {
url: 'http://blog.ingledow.co.uk',
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: '146.185.179.133',
// Port to be passed to node's `net.Server#listen()`, for iisnode set this to `process.env.PORT`
port: '2368'
}
}
/etc/nginx/nginx.conf
http {
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
/etc/nginx/sites-enabled/ghost.conf
server {
listen 80;
server_name blog.ingledow.co.uk;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
proxy_buffering off;
}
}
【问题讨论】:
-
不工作是什么意思?白页? 404? 502?
标签: apache nginx ghost-blog