How does 'locate' work?

GAZ082 nginx-forum at nginx.us
Thu Oct 22 21:05:41 MSD 2009


Awesome article. Been trying to tune it up a little, and now i'm getting a 403 in the directory documents, here is my full site.com config:

server {
    listen       80;
    server_name  www.site.com;
    #rewrite ^/(.*) http://site.com/$1 permanent;
    access_log /var/www/site.com/log/access.log;
    error_log /var/www/site.com/log/error.log;
    
    
    
    location / {
        root   /var/www/site.com/public/;
        index  index.html index.htm index.php;
        
    }
    
    location /documents { 
        root /var/www/site.com/public;
        auth_basic            "Access restricted.";
        auth_basic_user_file   /var/www/site.com/private/pass;
    }
    
    location ~ .php$ {
        #       root /var/www/site.com/public;
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        fastcgi_param  SCRIPT_FILENAME  /var/www/site.com/public$fastcgi_script_name;
        include /usr/local/nginx/conf/fastcgi_params;
    }
    
    
    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504 404 /error/error.htm;
    #   location = /var/www/site.com/public/error/ {
    #       root   htm;
    #    }

}

Permissions on the directory are:

drwxr-xr-x 3 admin admin    4096 Oct 22 15:15 documents

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,15688,15973#msg-15973






More information about the nginx mailing list