Linux – httpd.conf (ProxyPass and ProxyPassReverse)

apache-2.2httpd.conflinuxproxypass

I would like to ask what is the difference between the following configurations below.

application original URL/location: http://localhost:8080/MyServerApp/App_1

1st set-up/configuration

ProxyPreserveHost On
ProxyPass /app http://localhost:8080/MyServerApp/App_1 retry=0
ProxyPassReverse /app http://localhost:8080/MyServerApp/App_1

2nd set-up/configuration

<Location /app >
   ProxyPass          http://localhost:8080/MyServerApp/App_1
   ProxyPassReverse   http://localhost:8080/MyServerApp/App_1
</Location>

Best Answer

The different syntaxes are functionally identical. As stated in the manual :

When used inside a <Location> section, the first argument (of the directive syntax ProxyPass [PATH] !|URL) is omitted and the local directory is obtained from the <Location>.