plausible-hosting/reverse-proxy/apache2/plausible.conf
Phil Banks e023cf8874 Add ws proxy to apache2/plausible.conf
Websocket connections on apache2 were failing until it was routed correctly - caused tocket creation to fail.
2024-06-19 02:47:49 +07:00

21 lines
683 B
Plaintext

<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName example.com
ProxyPreserveHost On
ProxyAddHeaders On
ProxyPassMatch ^/(live/websocket)$ ws://localhost:8000/$1
ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/
SetEnvIf X-Forwarded-For "^.*\..*\..*\..*" forwarded
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" forwarded
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined env=!forwarded
CustomLog ${APACHE_LOG_DIR}/access.log forwarded env=forwarded
</VirtualHost>