Re: Is it possible to evaluate .htaccess before proxying requests? (Apache 2.4.9)

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

 




Am 16.05.2014 18:47, schrieb Eric Covener:
You could try mod_rewrite in directory context.

This configuration worked in our environment, .htaccess-files are evaluated
(thanks a lot to Eric Covener for his suggestion):
<Directory "/path/to/htdocs" >
Rewrite Engine On
RewriteRule ^(.*\.php)$ fcgi://127.0.0.1:4000/path/to/htdocs/$1 [P]
</Directory>

We hadn't had success with unix domain sockets though
RewriteRule ^(.*\.php)$ unix:/var/run/php-fpm.sock|fcgi://localhost/path/to/htdocs/$1 [P]

This is logged in the error log file:

No protocol handler was valid for the URL /info.php. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration
using LoadModule.

Since
1) the first RewriteRule above worked but the second didn't
2) and this worked (outside Directory context, of course):

<LocationMatch .*\.php$ >
ProxyPass unix:/var/run/php-fpm.sock|fcgi://localhost/path/to/htdocs
</LocationMatch>

I assume that there is no issue loading the correct module. Maybe the communication
between mod_rewrite and mod_proxy using UDS is buggy?

Is there any way to enable Proxying to a fcgi-daemon listening on a unix domain socket
using RewriteRule?

Thanks for your help!

Kind regards
Tobias Adolph

--
###############################
# Tobias Adolph		      #		
# Leibniz-Rechenzentrum	      #
# Zimmer I.2.019	      #
# Boltzmannstraße 1           #	
# 85748 Garching bei München  #	
###############################


---------------------------------------------------------------------
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