FAQ

Page Discussion History

Difference between revisions of "SPIP"

 
Line 8: Line 8:
 
     location / {
 
     location / {
 
         try_files $uri $uri/ /spip.php?q=$uri&$args;
 
         try_files $uri $uri/ /spip.php?q=$uri&$args;
 +
    }
 +
 +
    location ~^/(tmp|config)/{
 +
        return 403;
 
     }
 
     }
  
Line 19: Line 23:
 
}
 
}
 
</geshi>
 
</geshi>
 +
 +
SPIP was made to be used with Apache. So when you deploy a SPIP on a web server that don't use htaccess you must not permit visitors to access to tmp nor config (the database dumps are stored in /tmp so a visitor can discover admin password by a brut force attack).
 +
 +
Another way to prevent this kind of attack is
 +
# put these dir outside the spip root path
 +
# redefine _DIR_TMP & _DIR_CONNECT constants in mes_options.php

Revision as of 20:31, 13 January 2012

server {
    server_name emeagwali.net www.emeagwali.net;
    client_max_body_size 10m;
    root /var/www/spip;
    index index.php;
 
    location / {
        try_files $uri $uri/ /spip.php?q=$uri&$args;
    }
 
    location ~^/(tmp|config)/{
        return 403;
    }
 
    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php ;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}

SPIP was made to be used with Apache. So when you deploy a SPIP on a web server that don't use htaccess you must not permit visitors to access to tmp nor config (the database dumps are stored in /tmp so a visitor can discover admin password by a brut force attack).

Another way to prevent this kind of attack is

  1. put these dir outside the spip root path
  2. redefine _DIR_TMP & _DIR_CONNECT constants in mes_options.php