How to setup a Reverse Proxy
I have setup a Raspberry Pi 4 as a Hubzilla server on my local network (hubx.daninet.lan), and tried to connect it by my apache web server on a different computer.
This is my configuration, but it does not work as expected:
<VirtualHost *:80>
ServerName hub.hoteldaan.nl
ServerAdmin admin@kropveld.net
Redirect permanent / https://hub.hoteldaan.nl/
RewriteEngine on
RewriteCond %{SERVER_NAME} =hub.hoteldaan.nl
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName hub.hoteldaan.nl
ServerAdmin admin@kropveld.net
ProxyPreserveHost On
ProxyRequests off
ProxyPass / http://hubx.daninet.lan/
ProxyPassReverse / http://hubx.daninet.lan/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
RewriteRule /(.*) http://hubx.daninet.lan/$1 [P,L]
SSLCertificateFile /etc/letsencrypt/live/hoteldaan.nl/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/hoteldaan.nl/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
See my site on
#^https://hub.hoteldaan.nl (new registrations not allowed).
Anyone able to help?