# Permisson Denied 403

**URL:** <https://www.ruby-forum.com/t/permisson-denied-403/222041>\
**Category:** NGINX\
**Created:** [August 9, 2012, 8:46pm UTC](https://www.ruby-forum.com/t/permisson-denied-403/222041 "2012-08-09T20:46:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 9, 2012, 8:46pm UTC](https://www.ruby-forum.com/t/permisson-denied-403/222041/1 "2012-08-09T20:46:42Z")

</div>

Hello People !

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

When I go to [http://10.26.7.249:8080/dspam/cgi-bin/admin.cgi](http://10.26.7.249:8080/dspam/cgi-bin/admin.cgi), 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

    server_name 10.26.7.249;

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

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

    location /doc {
            root /usr/share;
            autoindex on;
            allow 127.0.0.1;
            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  
$document\_root$fastcgi\_script\_name;  
fastcgi\_param REMOTE\_USER $remote\_user;  
if ($uri ~ .cgi$ ){  
fastcgi\_pass unix:/var/run/fcgiwrap.socket;  
}  
}

How I can make this ?

Thanks.

Rodrigo

* * *

[http://wiki.linuxwall.info/doku.php/en:ressources:dossiers:dspam](http://wiki.linuxwall.info/doku.php/en:ressources:dossiers:dspam)

See the steps:

* * *

Put user DSPAM

#/etc/init.d/fcgiwrap  
FCGI\_USER= dspam  
FCGI\_GROUP=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 removed\_email\_address@domain.invalid  
htpasswd -c /var/www/dspam/passwords removed\_email\_address@domain.invalid  
New password:  
Re-type new password:  
Adding password for user removed\_email\_address@domain.invalid

# cat /var/www/dspam/passwords

removed\_email\_address@domain.invalid: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 configure.pl  
$CONFIG{’DSPAM\_HOME’} = “/var/spool/dspam”;  
$CONFIG{’DSPAM\_BIN’} = “/usr/bin”;  
[…]  
$CONFIG{’WEB\_ROOT’} = “/dspam/htdocs/”;  
[…]  
$CONFIG{’LOCAL\_DOMAIN’} = “debian.lab”;
