PHP can't run under alias folder
e123e123e123
nginx-forum at nginx.us
Sat Jul 18 19:19:17 MSD 2009
Thanks for all Good Ngnix Supporter , now gif / jpeg can display already .
>> Sorry, don't forget to add the auth to php block too or anyone can bypass the auth when accessing php files
do u mind , sorry my english not good :
location ~ ^/phpmyadmin/(.*\.php)$ {
alias /home/httpd/html/phpmyadmin/$1;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
change to
location ~ ^/phpmyadmin/(.*\.php)$ {
alias /home/httpd/html/phpmyadmin/$1;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
fastcgi_param SCRIPT_FILENAME $request_filename;
auth_basic "Restricted";
auth_basic_user_file /home/httpd/html/phpmyadmin/.htpasswd;
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,4151,4189#msg-4189
More information about the nginx
mailing list