I am running FBox inside Virtualbox, it all works. Now I want to proxy web services via Apache running on the host.
I have setup a subdomain for it, obtained LE certs in the host machine and added the lines below to dedicated vhost.
I am also running it under NAT network in Virtualbox so I forwarded :80 as 30080 to the host therefor you see these lines
ProxyPass / http://127.0.0.1:30080/
ProxyPassReverse / http://127.0.0.1:30080/
RequestHeader set X-Forwarded-Proto "https"
It does not work. I am wondering if such setup is possible? I alsready have a webserver running so my 443 and 80 are already taken. That is why I am trying to proxy it.
Thanks for the reply. Well I have some progress but hitting this issue when I try to login (which I was not even able to load the login page whatsoever before)
Would you please try setting ProxyPreserveHost yes in both Apache configurations? For FreedomBox it should be in /etc/apache2/sites-enabled/plinth.conf, I think.
If you are interested to contribute this piece to the official wiki, please feel free to edit the page /FreedomBox/Hardware/VirtualBox. Someone can always review the changes.
Ditto, but I didn’t want my existing webserver to do the ssl handoff, i.e. I wanted Lets Encrypt to just work on both my webserver and freedombox independently. It turns out this is called “SNI pass through” and is deceptively simple with nginx-full on debian:
Literally the only change I had to make to my existing webserver config was to change listen 443 ssl lines to not bind to the external ip: listen localhost:443 ssl.