我在Ubuntu 14.04 LTS上使用Apache 2.4.7作为代理在子域(http://blog.example.com)上安装了Ghost。
该子博客位于子域,但是当我尝试使用http://blog.example.com/ghost/editor/访问后端时,我收到了502代理错误:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /ghost/editor/.
Reason: Error reading from remote server
Apache/2.4.7 (Ubuntu) Server at blog.example.com Port 80
我的Apache虚拟主机配置如下所示:
<VirtualHost *:80>
ServerName blog.example.com
ProxyPreserveHost on
ProxyPass / http://myVPS_IP:2368/
</VirtualHost>
非常感谢您建议如何解决这个问题。
答案 0 :(得分:1)
尝试使用
<VirtualHost *:80>
ServerName blog.example.com
ProxyPreserveHost on
ProxyPass / http://myVPS_IP:2368/ Keepalive=On
</VirtualHost>
答案 1 :(得分:0)
您是否在Ghost的config.js中更新了url配置?确保它设置如下:
url: 'http://blog.example.com',