I've configured Apache to proxy all requests to foo.bar.com except for the the alias /bazbar. The proxy portion of the configuration works and the proxy pass portion works except that it serves the index.php as a plain text file.
How can I get Apache to serve the php files properly? Here is my configuration.
<VirtualHost *:80>
ServerName foo.bar.com
Alias /bazbar /var/www/bazbar
ProxyPreserveHost On
ProxyPass /bazbar !
<Location /bazbar>
SetHandler None
</Location>
<Location />
Order allow,deny
allow from all
ProxyPass http://localhost:8080
ProxyPassReverse http://localhost:8080
</Location>
</VirtualHost>
*note I have confired that php is configured properly because when I go to http://localhost/somescript.php the php renders properly
If you visit http://localhost:8080/ on that machine, do you get index.php served as a text file or does it run on the server? In the case of proxy, apache will simply take what it got, and feed it back to the client. My first look would be there.
Look at the <Location /bazbar> section. SetHandler None disables all handlers for that Location. You need to remove that directive in order for it to work as you expect.