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:

ProxyPass

Rewrite y ProxyPass

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    

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.