【发布时间】:2016-01-15 17:38:42
【问题描述】:
我不确定这是否可行,但有一种方法可以在子文件夹而不是子域 https://www.allaboutghost.com/how-to-install-ghost-in-a-subdirectory/ 上托管 Ghost 博客
我已经按照它所说的方式设置了所有内容,现在唯一需要做的就是从FlowRouter.notFound 函数中排除/blog。有没有办法做到这一点或设置路由来监听 nginx?
// 编辑
这是 nginx 配置
server {
listen 80;
server_name localhost;
location ^~ /blog {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:2368;
proxy_redirect off;
}
}
这里是幽灵配置
config = {
// ### Production
// When running Ghost in the wild, use the production environment.
// Configure your URL and mail settings here
production: {
url: 'https://www.raiseyourflag.com/blog',
//everything else
}
}
【问题讨论】:
标签: meteor nginx ghost-blog