Welcome! Log In Create A New Profile

Advanced

auth_request with vhost conf files

April 06, 2020 05:31PM
After a few false starts I've got auth_request passing parameters to php-fpm and my firebird database is allowing control of access to files in the storage filing system. Somewhat defeats the "This is cool because no php is touched for static content" and I have had to produce a slimline version of the access control but it works well with the dynamic pages.

Problem is this is all working on a single site http setup and when I move the setup to the target vhost domain I'm struggling to get this working with the https live site.

location /storage/attachments/ {
root /srv/website/domain/;
auth_request /authin;
auth_request_set $auth_status $upstream_status;
}

location = /authin {
internal;
set $query '';
if ($request_uri ~* "\/storage\/attachments\/([0-9]+)\/([0-9]+)\/([A-Za-z.]+).*") {
set $query $2;
}
proxy_pass /auth/auth.php?content_id=$query;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
}

is working fine on the http setup,

I've tried
resolver 8.8.8.8;
proxy_pass https://indiastudycircle.org/auth/auth.php?content_id=$query;

But I'm not sure if $query is being set at all ... on the simple setup I can see errors and that helped me set it all up, but on the vhost setup while I can create php errors on the logs there is nothing for the auth processing? Where do I head next?
Subject Author Posted

auth_request with vhost conf files

lsces April 06, 2020 05:31PM

Re: auth_request with vhost conf files

lsces April 06, 2020 08:35PM

Re: auth_request with vhost conf files

Francis Daly April 08, 2020 03:16AM

Re: auth_request with vhost conf files

lsces April 08, 2020 05:12AM

Re: auth_request with vhost conf files

Francis Daly April 08, 2020 04:14PM

Re: auth_request with vhost conf files

lsces April 10, 2020 05:55AM

Re: auth_request with vhost conf files

Francis Daly April 14, 2020 06:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 69
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready