Welcome! Log In Create A New Profile

Advanced

Re: Cannot create directory alias (with php pages)

Nikolaos Milas
August 14, 2014 09:06AM
On 14/8/2014 3:26 μμ, Francis Daly wrote:

> The combination of a regex location, alias, and try_files, probably does
> not do what you want.
>
> I suspect that the 404-with-no-error-log comes from this try_files line.

Thank you very much Francis,

I removed the try_files line and did the modifications you suggest (esp.
correction of the mistaken double inclusion of fastcgi_params you
noticed), and indeed it works. (I have not tested requesting a PHP page
with URL parameters yet.)

I have only decided to set:

fastcgi_param SCRIPT_FILENAME $request_filename;

following a suggestion from here:

http://blog.martinfjordvald.com/2011/01/no-input-file-specified-with-php-and-nginx/

rather than $document_root. Would you thing this setting is really
preferable/correct in our case or not?

Here is current configuration:

location ~ /xhprof(.+\.php)$ {

alias /usr/share/xhprof/xhprof_html$1;

allow 127.0.0.1;
allow ::1;
allow 10.10.10.0/24;
deny all;

fastcgi_cache off;

include /etc/nginx/fastcgi_params;

fastcgi_param PATH_INFO $fastcgi_script_name;

fastcgi_intercept_errors on;

fastcgi_buffer_size 384k;
fastcgi_buffers 256 16k;
fastcgi_busy_buffers_size 384k;
fastcgi_temp_file_write_size 384k;
fastcgi_read_timeout 240;
fastcgi_pass unix:/tmp/php-fpm.sock;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $request_filename;
}

Thanks again,
Nick

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Cannot create directory alias (with php pages)

Nikolaos Milas August 13, 2014 04:44PM

Re: Cannot create directory alias (with php pages)

Pascale Camille August 13, 2014 04:52PM

Re: Cannot create directory alias (with php pages)

Nikolaos Milas August 14, 2014 07:08AM

Re: Cannot create directory alias (with php pages)

Francis Daly August 14, 2014 08:28AM

Re: Cannot create directory alias (with php pages)

Nikolaos Milas August 14, 2014 09:06AM

Re: Cannot create directory alias (with php pages)

Francis Daly August 14, 2014 01:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 177
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready