Quantcast
Channel: Serverphorums.com
Viewing all articles
Browse latest Browse all 23908

Re: root and alias with php5-fpm

$
0
0
On Mon, Sep 07, 2015 at 11:23:32AM -0500, Kristofer Pettijohn wrote:

Hi there,

> I just want each location in each
> server to see /apps/grant/ as the root, and for try_files to process
> the index.php file in the base of that location last.

If I've understood you correctly, what you describe is not what your
current configuration does.

Assume that files called "yes" do exist on your filesystem, and files
called "no" do not exist.

What response do you want for requests for each of:

/grant/one/yes.txt
/grant/one/no.txt
/grant/one/yes.php
/grant/one/no.php

And do you get that response in each case? If not, does the difference
matter?

> Can someone provide some guidance?

I suggest using a named location for handling the "not there" fallback
-- either as the final argument to try_files, or perhaps as "error_page
404 = @fallback".

Then

location @fallback {
fastcgi_param SCRIPT_FILENAME /apps/grant/index.php;
include fastcgi_params;
fastcgi_pass unix:/local/sockets/grant.sock;
}

Test what order of the first two directives work in your fasctcgi server.

f
--
Francis Daly francis@daoine.org

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

Viewing all articles
Browse latest Browse all 23908

Trending Articles