server { listen 80; server_name awstats.example.com; error_log /var/log/nginx/awstats.log info; root /var/www/awstats/wwwroot; location ~ ^/cgi-bin/(awredir|awstats)\.pl { gzip off; fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME /var/www/awstats/tools/nginx/awstats-fcgi.php; fastcgi_param X_SCRIPT_FILENAME /var/www/awstats/wwwroot$fastcgi_script_name; fastcgi_param X_SCRIPT_NAME $fastcgi_script_name; fastcgi_buffer_size 4K; fastcgi_buffers 64 4k; include fastcgi_params; } }