auth_request with vhost conf files

Francis Daly francis at daoine.org
Wed Apr 8 20:13:13 UTC 2020


On Wed, Apr 08, 2020 at 05:12:59AM -0400, lsces wrote:
> Francis Daly Wrote:

Hi there,

> > I'm not quite sure where "the thing that handles the /auth/auth.php
> > request" is running. "proxy_pass" is for "something other than this
> > server{} block", so if this "local link" is effectively remote, then
> > proxy_pass is probably good to use.
> 
> This is where I am struggling a bit ;) and is probably the real question.
> The web side is handled by nginx, and the dynamic stuff by php-fpm, so I
> need 'auth' to run an instance of php-fpm

I think you are wondering if you should "fastcgi_pass php-fpm-service"
instead of "proxy_pass this-wb-service", and I suspect the answer is
"yes".

In nginx, you fastcgi_pass to a service and set some fastcgi_param
values that your fastcgi server cares about. In the "common" case,
that is based on the incoming request details and suitable variables
are already populated.

In this case, that may or may not happen, so you may need to set things
like SCRIPT_FILENAME manually -- I have not tested to see what is needed.


> proxy_pass was working on the local test setups ... but using
> 'localhost' while the vhost system does not have a single 'localhost' ... I
> just need to use the right root.

I don't understand what you mean there. The config you showed previously
had no "localhost" that I could see.

Possibly it does not matter now.

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list