linux:web:apache.orden.de.preferencias
Tabla de Contenidos
Apache orden de preferencias
Ver orden en que usa los VirtualHosts
apache2ctl -S
Orden de preferencias para directivas de config en Apache
- Alias/Redirect - First match wins - RewriteRule - Last match wins
In addition:
- Redirect over Alias
- Alias before Directory container
- Location containers run once before Alias, so Location will apply
ProxyPass
- The configured ProxyPass and ProxyPassMatch rules are checked in the order of configuration.
- The first rule that matches wins.
- So usually you should sort conflicting ProxyPass rules starting with the longest URLs first.
Rewrite y ProxyPass
- ProxyPass takes precedence before modrewrite and modalias
O rewrite en bloque Proxy
<Proxy *>
Redirect permanent /broken/page.html https://www.example.com/correct/page.html
RedirectMatch ^/deadstuff.+ http://www.example.com/correct/page.html
</Proxy>
ProxyPass / http://127.0.0.1:8090/ connectiontimeout=300 timeout=300
ProxyPassReverse / http://127.0.0.1:8090
- Regarding ProxyPass “working in the other direction”, this is only true if they're outside of a <Location>. Inside a <Location>, the rules of merging <Location> are followed, meaning you want your least-specific <Location> directives to come before the more specific ones. This allows the more specific ones to override the less specific directives.
Location y LocationMatch
Inside a <Location>, the rules of merging <Location> are followed, meaning you want your least-specific <Location> directives to come before the more specific ones. This allows the more specific ones to override the less specific directives.
linux/web/apache.orden.de.preferencias.txt · Última modificación: 2021/03/15 13:39 por grillo