Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Re: Negated Regular Expressions in location

$
0
0
My config looks like this:

server {

location /favicon.ico {
include caching.conf;
}

location /resources/ {
include caching.conf;
}

location /robots.txt {
include caching.conf;
}

location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://tomcat1;
proxy_pass_header server;
gzip_vary off;
}

}

In lighttpd, you could write something like

$HTTP["url"] !~ /resources|favicon.ico|robots.txt/ {
// do the proxy thing
}

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>