0

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.

1 Answer 1

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .