I've configured my nginx server + php. Eeverything works fine, except phpmyadmin.
I googled a lot and found some alias tricks, but they didn't work to me.
That works great:
location ~ ^/ololo/(.*\.php)$ {
alias $root_path/img/$1;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location /ololo/ {
alias $root_path/img/;
index index.php;
}
There is img
directory in my site path and when I request sitename/ololo/
or sitename/ololo/index.php
everything is fine.
But that:
location ~ ^/myadmin/(.*\.php)$ {
alias /usr/share/phpmyadmin/$1;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
location /myadmin/ {
alias /usr/share/phpmyadmin/;
index index.php;
}
won't work!
when I'm trying to request mysite/myadmin/
or mysite/myadmin/index.php
server throws me
No input file specified.
error message. In /usr/share/phpmyadmin/
are all .php
files.
What's wrong with my nginx.conf
?