2011年2月17日星期四

Problem with nginx/0.8.54 and alias

Hello,

I try to set up a simple alias louse find out how. I read many articles.
I almost try everything but nothing works. Currently I have this code in
the file /etc/nginx/sites-available/default.
[code]
server {
listen 80;
root /var/www/monsite.fr;
index index.html index.htm index.php;
server_name monsite.fr;

location /phpmyadmin {
access_log off;
alias /var/www/monsite.fr/phpMyAdmin;
index index.html index.php;
}

location / {
try_files $uri $uri/ /index.html;
}

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include fastcgi_params;
}
}
[/code]

When I launch my browser's page http://monsite.fr/phpmyadmin/ I fall on
the index.html file that I put in the directory
/var/www/monsite.fr/phpMyAdmin/. By cons, when I run
http://monsite.fr/phpmyadmin/index.php, there is nothing. The header
returned is HTTP/1.1 404 Not Found.

Thanks.

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


_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

没有评论:

发表评论