404 location problem
Maxim Dounin
mdounin at mdounin.ru
Thu Jan 14 13:06:36 MSK 2010
Hello!
On Wed, Jan 13, 2010 at 10:41:33PM -0500, lnxa wrote:
>
> server {
> listen 80;
> server_name www.abc.com;
> #root /data0/www/abc;
> #index index.htm index.html index.php;
> location / {
> root /data0/www/abc;
> index index.htm index.html index.php;
> }
> location /blog/ {
> alias /data0/www/blog/;
> }
> #php fastcgi
> location ~ \.php$ {
> root /data0/www/abc;
> fastcgi_pass 127.0.0.1:9000;
> fastcgi_index index.php;
> #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
> include fastcgi.conf;
> }
>
> }
>
> http://www.abc.com/blog/index.php error 403
>
> in this case must copy /data0/www/blog to /data0/www/abc? not other idea?
server {
listen 80;
server_name www.abc.com;
root /data0/www/abc;
index index.htm index.html index.php;
location / {
# everything inherited here
}
location /blog/ {
root /data0/www;
}
location ~ ^/blog/.*\.php$ {
root /data0/www;
fastcgi_pass 127.0.0.1:9000;
include fastcgi.conf;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi.conf;
}
}
Maxim Dounin
More information about the nginx
mailing list