Problem with nginx/0.8.54 and alias

Amanager nginx-forum at nginx.us
Thu Feb 17 16:16:39 MSK 2011


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




More information about the nginx mailing list