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
}
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
}