Robots and favicon declarations
Hello,
I have setup NGINX as a Reverse Proxy on Apache by following the default installation of cPanel. At the generated configuration file "/etc/nginx/conf.d/users/myuser.conf", I see the below lines about the favicon.ico and robots.txt files. What do these declarations exactly mean? Are these files served directly by NGINX instead of being proxied via Apache?
server {
...
location = /favicon.ico {
allow all;
log_not_found off;
access_log off;
include conf.d/includes-optional/cpanel-proxy.conf;
proxy_pass $CPANEL_APACHE_PROXY_PASS;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
include conf.d/includes-optional/cpanel-proxy.conf;
proxy_pass $CPANEL_APACHE_PROXY_PASS;
}
location / {
proxy_cache $CPANEL_PROXY_CACHE;
proxy_no_cache $CPANEL_SKIP_PROXY_CACHING;
proxy_cache_bypass $CPANEL_SKIP_PROXY_CACHING;
proxy_cache_valid 200 10d;
proxy_cache_valid 301 10d;
proxy_cache_valid 302 10d;
proxy_cache_valid 404 1m;
proxy_cache_use_stale error timeout http_429 http_500 http_502 http_503 http_504;
proxy_cache_background_update on;
proxy_cache_revalidate on;
proxy_cache_min_uses 1;
proxy_cache_lock off;
include conf.d/includes-optional/cpanel-proxy.conf;
proxy_pass $CPANEL_APACHE_PROXY_PASS;
}
}
-
Hey there! Details about the conditions can be found in the Nginx docs, such as the log_not_found entry here:
http://nginx.org/en/docs/http/ngx_http_core_module.html#log_not_found
The bottom section with the proxy_cache_* settings just tells Nginx how long and what to cache. None of these rules have the file handled directly by Apache except the three lines with SKIP.
0
Please sign in to leave a comment.
Comments
1 comment