2

AFAIK you can't conditionally set the DocumentRoot. However, you could internally rewrite the request using mod_rewrite, in much the same way you are returning a 403 response when the client SSL is not set. For example, if you set: DocumentRoot /var/www Then internally rewrite all requests to /var/www/has_ssl on success or /var/www/no_ssl otherwise. ...


2

Nothing complicated on the DNS level : you point the domain you want your users to use to a server running a reverse proxy (either a dedicated product or web server like for instance Apache that has such functionality built in) and configure that reverse proxy to send requests for a particular URI space to a backend (rather than displaying local content ). ...


2

Short answer: What you are looking for is called a Reverse Proxy. It's effectively a webserver that takes requests from the client and forwards them to a different webserver, usually on the internal network. Both Apache and IIS are capable of doing this. Another application commonly used for this purpose is nginx. There should be plenty of documentation for ...


1

I managed to solve the issue by having both backend and front end using HTTPS. I had tried that before but it did not work. It only worked when I updated the VM instance group port mapping to https only. Before I had two port name mapping entries: http and https. I am not really sure how this impacted but it did...


1

try adding a trailing slash to the end of the proxy ie proxy_pass http://localhost:8080/; I've had issues in the past where the location is being appended directly to the URL, eg https://localhostSomepage instead of https://localhost/Somepage. Hope this helps.


Only top voted, non community-wiki answers of a minimum length are eligible