is it possible to have an Apache server dynamically proxy all requests defined by a subdir? Like:
https://proxy.example.com/host1 -> https://host1.example.com
https://proxy.example.com/host2 -> https://host2.example.com
https://proxy.example.com/host3/dir1 -> https://host3.example.com/dir1
Bonus:
https://proxy.example.com/host4:8000 -> https://host4.example.com:8000
https://proxy.example.com/host5:8080/dir2 -> https://host5.example.com:8080/dir2
My knowledge is, ahem, limited. Is the following example something that can be expanded?
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST} [P]
SSLEngine on
SSLProxyEngine On
ProxyRequests Off
ProxyPass / https://$1/
ProxyPassReverse / https://$1/
ProxyPreserveHost On
Kind regards