#手动在nginx.conf里添加如下内容 location ~ .*\.cgi$ { gzip off; #gzip makes scripts feel slower since they have to complete before getting gzipped fastcgi_pass unix:/tmp/cgiwrap-dispatch.sock; fastcgi_index index.cgi; include fcgi.conf; auth_basic "Nagios Login"; auth_basic_user_file /usr/local/nagios/etc/nagios.htpasswd; }