I have a service on port 3000 with Proxy/ReverseProxy on Apache at Port 80 on http://myserver/foo.
I want to put another server on port 3456 and Proxy/ReverseProxy it from http://myserver/bar on Apache as well.
What would be the best strategy?
My foo.conf on httpd/conf.d
<VirtualHost *:80>
RewriteEngine on
RewriteRule ^/?$ /foo/ [R=permanent,L]
<Location "/foo">
ProxyPass http://localhost:3000
</Location>
ProxyPassReverse /foo http://localhost:3000
ProxyPreserveHost On
</VirtualHost>
You can basically just repeat what you already have for the
/barURL-path as well. Except you'll need to move the existingProxyPassReversedirective inside the<Location>section. (In your current config, you don't strictly need the<Location>section.)For example:
Although this
<VirtualHost>container would seem incomplete since you have noServerName(ServerAlias,ErrorLog, etc.) directive(s). So I assume these are already defined in the main server config?