I am sorry if this question as already been asked somewhere else, but I have been struggling with this for days now.
I am trying to setup a CloudFoundry Virtual Machine on a private Server. The Cloud Foundry instance works fine and my test REST service deployed on the route rest
.
While connected using ssh, the following test using curl works just as expected:
curl rest.10.244.0.34.xip.io
I am trying to set the apache configuration on the private server in order to expose the applications deployed on the CloudFoundry VM to the internet.
I created a A DNS entry like cloud.MY_PUBLIC_IP
and *.cloud.MY_PUBLIC_IP
refering both to MY_PUBLIC_IP
and would like to be able to access the applications deployed on the CloudFoundry VM using one of the two following URLS:
application-route.cloud.MY_PUBLIC_IP
cloud.MY_PUBLIC_IP/application-route
Firewall is disable.
I am not sure if this is doable using apache vhost
or proxy
.
So far, I created the following vhost configuration:
<VirtualHost *:80>
ServerName cloud.MY_PUBLIC_NAME.ch
ProxyPass / http://10.244.0.34.xip.io/
ProxyPassReverse / http://10.244.0.34.xip.io/
ProxyRequests Off
RewriteEngine On
RewriteCond %{HTTP_HOST} ^cloud\.MY_PUBLIC_NAME\.ch$ [NC]
RewriteRule ^/([^/]+)/(.*)$ http://$1.10.244.0.34.xip.io/$2 [P,L]
</VirtualHost>
cloud.MY_PUBLIC_IP
does redirect me to 10.244.0.34.xip.io
but I cannot access any deployed application...
Many thanks in advance for any help.