liushaobo wrote:
>
>
> hello
>
> I user centos-5 , postfix-2.6.0-1, I not used nginx, not configure
> nginx ,
> Want to know how to configure nginx in dspam-web,Did not know where
> was wrong;
>
> nginx.conf configure
> location /dspam/ {
> alias /var/www/dspam/cgi-bin/;
> fastcgi_index dspam.cgi;
> auth_basic "Dspam auth";
> auth_basic_user_file /var/www/dspam/cgi-bin/.htpasswd;
> }
>
>
> nginx error.log
>
> 2010/09/05 12:35:18 [error] 26017#0: *2 directory index of
> "/var/www/dspam/cgi-bin/" is forbidden, client: 123.158.x.x, server:
> 116.254.x.x, request: "GET /dspam/ HTTP/1.1", host: "mail.xxxx.com"

liuhaobo,

You are missing some things to make ngnix work for you. Go read about
'spawn-fcgi'

I will paste you an example of nginx+dspam-webui configuration (Once you
have this working then change to SSL) and I hope that helps you learn
what you need to do. The example uses PAM->Mysqltable for
authentication, you can use something else.


server {
listen 80 default rcvbuf=64k backlog=128;
server_name 127.0.0.1 localhost [SERVER.DOMAIN.TLD] "";
access_log /var/log/nginx-access.log main;
error_log /var/log/nginx-error.log info;
root /usr/local/www/nginx-dist;
index index.html index.htm;
include /usr/local/etc/nginx/fastcgi_params;
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;



location ~*
"^/dspam/((admins|subadmins|configure\.pl|default\.prefs|rgb\.txt)(\?.*)|templates(/?.*)?)$"
{
internal;
}
location ^~ /dspam/ {
auth_pam "DSPAM WebUI - Restricted Access";
auth_pam_service_name "dspam-webui";
fastcgi_index dspam.cgi;
fastcgi_read_timeout 15m;
if (!-f $request_filename) {
rewrite . http://$host/dspam/dspam.cgi permanent;
break;
}

if ($request_filename ~* "^.+\.cgi(\?.*)?$") {
fastcgi_pass 127.0.0.1:9000;
}
}



location ~ ^/cgi\-bin/.*\.(cgi|pl)$ {
gzip off;
root /usr/local/www;
fastcgi_pass 127.0.0.1:9000;
fastcgi_read_timeout 15m;
fastcgi_index index.cgi;
#fastcgi_param DOCUMENT_ROOT /usr/local/www;
#fastcgi_param SCRIPT_FILENAME /usr/local/www$fastcgi_script_name;



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Dspam-user mailing list
Dspam-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-user

Reply via email to