# IngRRD (https://forge.riquer.fr/p/ingrrd/) # Copyright (C) 2014-2015 Vincent Riquer # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . 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; } } }