Permisson Denied 403

rodrigo tavares rodrigofariat at
Thu Aug 9 18:46:15 UTC 2012

Hello People !

I begin a configure DSPAM, and the interface is basead in ngix. 

When I go to, come 403 Forbbiden.
The configuration the DSPAM is abaixo,case any can to read.

server {

        listen   8080; ## listen for ipv4
        #listen   [::]:80 default ipv6only=on; ## listen for ipv6


        access_log  /var/log/nginx/localhost.access.log;

        location / {
                root   /var/www;
                index  index.html index.htm;

        location /doc {
                root   /usr/share;
                autoindex on;
                deny all;

        location /images {
                root   /usr/share;
                autoindex on;

 location /dspam/cgi-bin {
                auth_basic DSPAM;
                auth_basic_user_file /var/www/dspam/passwords;
                include /etc/nginx/fastcgi_params;
                index dspam.cgi;
                fastcgi_param  SCRIPT_FILENAME
                fastcgi_param REMOTE_USER  $remote_user;
                if ($uri ~  \.cgi$ ){
                        fastcgi_pass  unix:/var/run/fcgiwrap.socket;

   How I can make this ?




See the steps:

Put user DSPAM

FCGI_USER= dspam
/etc/init.d/fcgiwrap restart
# chmod o+w /var/run/fcgiwrap.socket
Add this lines in /etc/nginx/sites-available/default
vim /etc/nginx/sites-available/default
	location /dspam/cgi-bin {
		auth_basic      « DSPAM »;
		auth_basic_user_file  /var/www/dspam/passwords; 
		include /etc/nginx/fastcgi_params;
		index dspam.cgi;
		fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
		fastcgi_param REMOTE_USER  $remote_user;
		if ($uri ~ « \.cgi$ »){
			fastcgi_pass  unix:/var/run/fcgiwrap.socket;
# /etc/init.d/nginx restart
Define password para o user  jean-kevin at debian.lab 
htpasswd -c /var/www/dspam/passwords jean-kevin at debian.lab 
New password:
Re-type new password:
Adding password for user jean-kevin at debian.lab
# cat /var/www/dspam/passwords
jean-kevin at debian.lab:H2CigqsDz1U4E
# chown dspam:www-data /var/www/dspam/passwords 
# chmod o-rwx /var/www/dspam/password

Copy inteface for /var/www/dspam

cp -r ~/dspam-3.9.1-RC1/webui/* /var/www/dspam/
# chown dspam:www-data /var/www/dspam -R
#define variables for
$CONFIG{’DSPAM_HOME’}   = “/var/spool/dspam”; 
$CONFIG{’DSPAM_BIN’}    = “/usr/bin”;
$CONFIG{’WEB_ROOT’}     = “/dspam/htdocs/”;
$CONFIG{’LOCAL_DOMAIN’} = “debian.lab”;
he interface provides an administration section. To have access to it, 
you need to declare an admin in the file 
echo ‘jean-kevin at debian.lab’ >> /var/www/dspam/cgi-bin/admin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list