liushaobo wrote:
>
>
> > Date: Sun, 5 Sep 2010 09:08:00 +0100
> > From: ds...@cytringan.co.uk
> > To: liusha...@live.com
> > CC: dspam-user@lists.sourceforge.net
> > Subject: Re: [Dspam-user] Configure dspam-web in nginx
> >
> > 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 $doc ument_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;
> >
> >
>
>
> hello
> Thanks material which you provide,I do not understand the nginx
> configuration,
> For example "fastcgi_pass 127.0.0.1:9000;" ,Why uses 9000 port?
> I follow your document test, no 。I further study, thanks
>
>
|# yum install spawn-fcgi

You then start as a service on port 9000
Google for 'spawn-fcgi' or nginx + perl + cgi

When your nginx loads a .cgi or .pl from the /cgi-bin/ folder is passes
it to 127.0.0.1:9000 to spawn-fcgi to process


You may also need to add this to /etc/ngnix/||fastcgi_params|
|
fastcgi_param REMOTE_USER $remote_user;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;


LIST: I'm no nginx expert, so please correct me if i'm wrong

|

------------------------------------------------------------------------------
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