Johann, you are very welcome and I am happy to open you the world of perl regex assertions, but in spite of your original question this should not be a problem because of the order locations are defined and processed. See http://nginx.org/en/docs/http/request_processing.html for the rules about location/request processing order.
So if you define:
location = /favicon.ico {
// need to include something here.
}
location /resources/ {
// need to include something here.
}
location = /robots.txt {
// need to include something here.
}
location ~ ^/ {
proxy_pass http://tomcat3;
}
Then "location ~ ^/" will only capture requests that do not match those specific locations defined above "location /" (with no regex).
Andrejs
loco (at) andrews.lv
So if you define:
location = /favicon.ico {
// need to include something here.
}
location /resources/ {
// need to include something here.
}
location = /robots.txt {
// need to include something here.
}
location ~ ^/ {
proxy_pass http://tomcat3;
}
Then "location ~ ^/" will only capture requests that do not match those specific locations defined above "location /" (with no regex).
Andrejs
loco (at) andrews.lv