View Single Post
  #1  
Old 14th October 2012, 18:19
dupcantx dupcantx is offline
Junior Member
 
Join Date: Oct 2012
Posts: 3
Thanks: 2
Thanked 0 Times in 0 Posts
Red face Nginx Protected folders nothing PHP support (solved)

Hi, I'm actually using ISPConfig 3.0.4.6 with NginX and php-fpm on Centos 5.
I want to report a little bug in "Protected Folders".

When I add new "Protected Folder", the nginx configuration do not write PHP section, so when i try to run the /Protected-Folder/index.php, it will be downloaded and not interpreted.

solved

file /etc/nginx/sites-available/domain.tld.vhost

Quote:
location ^ ~ /Protected-Folder/ {
auth_basic "Members Only";
auth_basic_user_file /var/www/clients/client1/web5/web/Protected-Folder/.htpasswd;
}
to

Quote:
location ^ ~ /Protected-Folder/ {
auth_basic "Members Only";
auth_basic_user_file / var/www/clients/client1/web5/web/Protected-Folder/.htpasswd;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix :/var/lib/php5-fpm/web5.sock; - or fastcgi_pass 127.0.0.1:9010;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
fastcgi_param PATH_INFO $ fastcgi_script_name;
fastcgi_intercept_errors one;
}
changed

best regards

Last edited by dupcantx; 15th October 2012 at 12:28.
Reply With Quote
Sponsored Links