server { listen 80; listen [::]:80; server_name ingrrd.example.com; root /var/www/IngRRD/htdocs/; access_log /var/log/nginx/ingrrd.example.com.access; location /cgi { include fastcgi_params; root /var/www/IngRRD/; fastcgi_param SCRIPT_FILENAME /var/www/IngRRD/$fastcgi_script_name; fastcgi_pass /var/run/fcgiwrap.sock; # If you activate clear_cache_on_update, it is recommended to # use a separate cache for this VHost. fastcgi_cache IngRRD; # ... so you can cache unchanged data for a long time fastcgi_cache_valid any 1h; fastcgi_cache_use_stale updating; fastcgi_cache_lock on; location ~ ^/cgi/(.+)/add(\.html)? { auth_basic "Who are you?"; auth_basic_user_file /var/www/IngRRD/htpass; include fastcgi_params; root /var/www/IngRRD/; fastcgi_param SCRIPT_FILENAME /var/www/IngRRD/$fastcgi_script_name; fastcgi_pass /var/run/fcgiwrap.sock; fastcgi_param AUTH_USER $remote_user; fastcgi_cache_valid any 1s; } } }