PHP below server root not served
nano
nanotek at bsdbox.co
Thu Jan 9 14:42:41 UTC 2014
On 9/01/2014 11:57 PM, B.R. wrote:
>
> II. Use a smarter (and more scalable, in light of future adds to the
> nginx config) way, which is nesting the rules of 'location
> /phpmyadmin/(.*\.php)$' in a 'location ~\.php$' block embedded in a
> 'location ^~ /phpmyadmin/' block.
>
I have attempted several variations of this format[1] you recommend and
continue to produce a broken site; dialog to download
application/octet-stream from the main servername.com and a 'File not
found.' from https://servername.com/phpmyadmin.
[1]
location / {
try_files $uri $uri/ /index.php?$args;
}
location ^~ /phpmyadmin {
alias /usr/local/www/phpMyAdmin/;
index index.php index.html;
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_param DOCUMENT_ROOT /usr/local/www/phpMyAdmin;
fastcgi_param SCRIPT_FILENAME /usr/local/www/phpMyAdmin/$1;
fastcgi_param SCRIPT_FILENAME
/usr/local/www/site1/wordpress$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
include fastcgi_params;
}
}
I eagerly anticipate a working example if and when you can provide one.
Thank you.
--
syn.bsdbox.co
More information about the nginx
mailing list