0
我正在使用本地主機和Windows操作系統。 NGINX在端口80上運行,Node.js應用(Ghost)在端口2368上運行。通過NGINX(本地主機)在端口80上運行Ghost
我想使用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應用程序。我怎樣才能做到這一點?
您應該定義「localghost」的確切位置。您將需要編輯Windows主機文件,以便轉到127.0.0.1。 – Andrius