I am trying to use apache reverse proxy in order to expose a webapp running on a vm in the vpn network to which the host machine is connected.
Basically, it should look like this:
VM(192.168.56.107) --> host(192.168.56.100,10.10.10.10) --> reverse proxy --> vpn --> client
I have tried the following configuration on apache2 on the host
<IfModule mod_proxy.c>
<VirtualHost 10.10.10.10:80>
ServerName 10.10.10.10
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
<VirtualHost 10.10.10.10:443>
ServerName 10.10.10.10
SSLProxyEngine On
SSLProxyCheckPeerExpire off
SSLProxyCheckPeerCN off
SSLProxyVerify none
ProxyPass /webapp/ http://192.168.56.107:8384/
ProxyPassReverse /webapp/ http://192.168.56.107:8384/
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
CustomLog ${APACHE_LOG_DIR}/vhosts/webapp_access.log combined
ErrorLog ${APACHE_LOG_DIR}/vhosts/webapp_error.log
<Proxy *>
Order Allow,Deny
Allow from all
</Proxy>
</VirtualHost>
</IfModule>
However, with my current configuration I cannot connect to the webapp as when I enter the correct IP in the browser (https://10.10.10.10/webapp/) I get redirected to the vm internal IP (192.168.56.107).