
我在 Azure Linux (Ubuntu 14.04) 上有一個 Ruby on Rails 網站,可以從以下地址完美運行:
http://mydomain.cloudapp.net:3000
我想刪除地址中的端口,並將其重定向到我擁有的子網域。我已經000-default.conf
在 Apache 上進行瞭如下設定:
<VirtualHost *:80>
ServerName myweb.example.com
DocumentRoot /var/www/html/mywebsite
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
</VirtualHost>
我已經重新啟動了apache2。在我的網域管理器上,我建立了一個從myweb.example.com
到 的CNAME mydomain.cloudapp.net
。
但是,當我輸入時,http://myweb.example.com
我收到 500 內部伺服器錯誤。它確實可以與http://myweb.example.com:3000
.我究竟做錯了什麼?
編輯:嘗試存取後的 error_log 訊息http://myweb.example.com
[Sun Aug 23 16:02:40.634116 2015] [proxy:warn] [pid 3189:tid 140710588688128] [c
lient 92.251.128.56:52583] AH01144: No protocol handler was valid for the URL /.
If you are using a DSO version of mod_proxy, make sure the proxy submodules are
included in the configuration using LoadModule.
答案1
看起來你只需要加載mod_proxy_http
.