Re: Using "AddHandler" with "mod_proxy"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 4, 2021 at 8:35 PM Natassia
<natassia75@xxxxxxxxxxxxxx.invalid> wrote:
>
> Hello,
>
> I have a situation that I am trying to resolve since Monday.
>
> I am starting to deploy PHP-FPM on a server infrastructure.
> Until now, I was using a .htaccess to change the PHP version in a folder.
>
> AddHandler application/x-httpd-php74 .php
>
> With FPM in socket, it is impossible to use this system.
>
> <FilesMatch "\.php$">
>   SetHandler "proxy:unix:/tmp/dev-fpm/natassia-fpm.sock|fcgi://localhost/"
> </FilesMatch>
>
> I can put this in an .htaccess, it works:
>
> Addhandler "proxy:unix:/tmp/dev-fpm/natassia-fpm.sock|fcgi://localhost/" .php
>
> But I have very old applications that change the .htaccess files every hour. It's stupid, but they are closed sources...
>
> I found a possible solution:
>
> => .htaccess:
> AddHandler ${application/x-httpd-php74} .php
>
> => VHOST:
> Define "application/x-httpd-php74" "proxy:unix:/tmp/dev-fpm/natassia-fpm.sock|fcgi://localhost/"
>
> But the problem is the "${" and "}" in the file that is needed.
>
> After I found that with "mod_actions" there would be a possibility, but it does not want "proxy:" in the function.
>
> Do you have a solution to have the line "AddHandler application/x-httpd-php74 .php" that allows to run "proxy:unix:/tmp/dev-fpm/natassia-fpm.sock|fcgi://localhost/" ?
> I would like to create my own AddHandler to do an action if => make this :)
>

It looks like types set via RewriteRule H= flag will override the type
set by mod_mime/AddHandler.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux