![伺服器日誌中的代理錯誤](https://rvso.com/image/760966/%E4%BC%BA%E6%9C%8D%E5%99%A8%E6%97%A5%E8%AA%8C%E4%B8%AD%E7%9A%84%E4%BB%A3%E7%90%86%E9%8C%AF%E8%AA%A4.png)
我在 website.com 上運行 React 前端,在 app.website.com 上運行第二個前端,在 website.com:8080 上運行 Node 後端。
伺服器日誌中的錯誤
我的伺服器日誌中有兩個錯誤,它們經常出現(就像每隔一天一樣),並且總是組合在一起出現。引用者有時不同,有時不同https://app.website.com/
[proxy_http:error] [pid 21002:tid 140688062592768] (70007)The timeout specified has expired: [client xx.xxx.xx.xx:50461] AH01102: error reading status line from remote server 127.0.0.1:8080, referer: https://website.com/sign-up
[proxy:error] [pid 21002:tid 140688062592768] [client xx.xxx.xx.xx:50461] AH00898: Error reading from remote server returned by /api/v2/register_stakeholder, referer: https://website.com/sign-up
虛擬主機包括
<VirtualHost *:80>
ServerName website.com
ProxyPreserveHost On
ProxyPass /api/ http://127.0.0.1:8080/
ProxyPassReverse /api/ http://127.0.0.1:8080/
</VirtualHost>
<VirtualHost *:80>
ServerName app.website.com
ProxyPreserveHost On
ProxyPass /api http://127.0.0.1:8080/api/
ProxyPassReverse /api http://127.0.0.1:8080/api/
</VirtualHost>
問題
是什麼導致了這些錯誤以及如何解決這些錯誤?
我自己對虛擬主機所知甚少,無法詢問為我設定虛擬主機的開發人員。所有三個錯誤似乎都表明代理配置不正確。在https://serverfault.com/a/237485/我讀到了一些關於添加Keepalive=On
到ProxyPass
行中的內容。但我不知道這會做什麼,是否可以解決我的問題,以及這樣做是否安全。