Config help needed

Edho P Arief edhoprima at gmail.com
Thu Jul 22 21:38:42 MSD 2010


On Fri, Jul 23, 2010 at 12:12 AM, Ian Hobson <ian at ianhobson.co.uk> wrote:
> Hi all,
>
> I am trying, and failing to set up a server to serve phpmyadmin.
>
> This is my config (one of about 30 tried).
>
> server {
>     listen 80 default;
>     server_name  default.anake.hcs localhost;
>     index index.php index.htm index.html;
>     root   /var/www/nginx-default/;
>     location /doc {
>         root   /usr/share;
>         autoindex on;
>         allow 127.0.0.1;
>         deny all;
>     }
>     location /images {
>         root   /usr/share;
>         autoindex on;
>     }
>     #
>     # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
>     #
>     location ~ \.php$ {
         fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
>         include /etc/nginx/fastcgi.conf;
>         fastcgi_pass   127.0.0.1:9000;
>     }
     location ~ ^/phpmyadmin/.*\.php$ {
         root /usr/share;
         fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
         include /etc/nginx/fastcgi.conf;
         fastcgi_pass   127.0.0.1:9000;
     }
>     #
>     # phpmyadmin - installed in /usr/share/phpmyadmin/index.php etc
>     #
    #phpmyadmin login page is horribly broken when accessed without extra slash
    location = /phpmyadmin { rewrite ^ /phpmyadmin/ redirect; }
>     location /phpmyadmin/ {
>         root    /usr/share;
>         index   index.php;
>     }
> }
>
> Results
> /test.php                              Correct. Properly passes
> /var/www/nginx-default/tesst.php to fast-cgi and displays the results
> /phpmyadmin                        No input file specified.
> /phpmyadmin/                       No input file specified.
> /phpmyadmin/index.php         No input file specified.
>
> I'm using nginx/0.7.67
>
> Help much appreciated
>
> Regards
> Ian
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
>



-- 
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org


More information about the nginx mailing list