Score:0

Apache2 simple reverse proxy forwarding http traffic to lxd container only loads plain html very slowly on graphic browser

kr flag

The actual web servers run on LXD containers, while the host Apache2 simply forwards http traffic to the containers. The setup is simple on the host, everything else is default:

<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ProxyPass / http://lxd.container.ip/
ProxyPassReverse / http://lxd.container.ip/
</VirtualHost>

For whatever reason, the website loads very slowly on graphic browsers and when it finally loads, it only renders plain html. On text browsers the website finishes loading almost instantly. If the proxy is set through LXD as a device via

lxc config device add mycontainer http proxy listen=tcp:0.0.0.0:80 connect=tcp:127.0.0.1:80

the website behaves correctly, but this method doesn't allow me to share one public IP for all sites on the same port. I also need to isolate the server for each site on separate containers, so I cannot just put them in different document roots.

Score:0
kr flag

OK, according to this thread, Apache2 is the wrong tool to use for PHP. I'll use a real proxy server instead.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.