I am trying to configure apache to act as a proxy for certain sub-domains. I have almost got it configured, but there is a problem.
With this config, I have managed to get www.mywebsite.com to be served normally (no proxy / default apache config) whilst having subdomain.mywebsite.com served via proxy to localhost port 8080. The problem I am having, is that requests to files other than index.html get proxy error 502.
ServerAdmin [email protected]
ServerName subdomain.mywebsite.com
DocumentRoot "/opt/www/subdomain"
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://127.0.0.1:8080
ProxyPassReverse / http://127.0.0.1:8080
How can I configure apache to serve ALL files via proxy?
I don't quite see how what you posted does what you want. But my understanding of the question may be wrong. I understand you want to have:
Therefore you simply need this:
One difference in the ProxyPass lines to what you have is that I have a trailing slash to match the right side of the directive.