I’m running a React frontend on website.com, a second frontend on app.website.com, and a Node back-end on website.com:8080.
Errors in server logs
I have two errors in my server logs that show up quite regularly (like every other day) and always show up together in combination. The referer sometimes differs and sometimes is also 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 includes
<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>
Question
What is causing these errors and how can I solve them?
I know very little myself about virtualhosts and can’t ask the developer who set it up for me.
All three errors seem to point to an incorrect configuration of the proxy. At https://serverfault.com/a/237485/ I read something about adding Keepalive=On
to the ProxyPass
line. But I have no idea what that does, if that would solve my problem, and if it is secure to do so.