【发布时间】:2015-11-07 10:36:27
【问题描述】:
我正在使用本地主机和 Windows 操作系统。 NGINX 运行在 80 端口,Node.js 应用(Ghost)运行在 2368 端口。
我想使用 NGINX 作为 Ghost 应用程序的前端 Web 服务器。所以我在nginx.conf 文件中写道:
server {
listen 80;
server_name localghost;
# change above to example.com in production mode
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
}
NGINX 目录为C:\nginx,Ghost 目录为C:\nginx\www\ghost。
http://localghost 地址未打开 Ghost 应用程序。我该怎么做?
【问题讨论】:
-
您应该定义“localhost”的确切位置。您需要编辑您的 Windows 主机文件,使其转到 127.0.0.1。
标签: node.js windows nginx ghost