我使用Nginx的爲需要的請求,然後做了proxy_pass擺脫端口8001Nginx的反向代理造成504網關超時
運行如果我去mywebsite上游服務器的實際Web應用程序反向代理。 com或做一個wget,60秒後我得到一個504網關超時...但是,如果我加載mywebsite.com:8001,應用程序按預期加載!
因此,一些被禁止的nginx與上游服務器進行通信......
這一切開始後,我的託管公司復位機我的東西是上運行,在此之前,沒有任何問題都沒有。
這裏是我的虛擬主機服務塊:
server {
listen 80;
server_name mywebsite.com;
root /home/user/public_html/mywebsite.com/public;
access_log /home/user/public_html/mywebsite.com/log/access.log upstreamlog;
error_log /home/user/public_html/mywebsite.com/log/error.log;
location/{
proxy_pass http://xxx.xxx.xxx.xxx:8001;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
從我的Nginx的錯誤日誌輸出:
2014年6月27日13時10分58秒[錯誤] 31406#0 :* 1上行超時(110:連接超時),連接上行時,客戶端:xxx.xx.xxx.xxx,服務器:mywebsite.com,請求:「GET/HTTP/1.1」,上行:「http://xxx.xxx.xxx.xxx:8001/」,主機:「mywebsite.com」
服務器運行SELinux嗎? – CrackerJack9