Problem with nginx/0.8.54 and alias

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


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.
server {
        listen   80;
        root /var/www/;
        index index.html index.htm index.php;

        location /phpmyadmin {
                access_log off;
                alias /var/www/;
                index index.html index.php;

        location / {
                try_files $uri $uri/ /index.html;
        location ~ \.php$ {
                fastcgi_index index.php;
                fastcgi_param  SCRIPT_FILENAME
                include fastcgi_params;

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


Posted at Nginx Forum:,176110,176110#msg-176110

More information about the nginx mailing list