httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tobias Adolph <Tobias.Ado...@lrz.de>
Subject Re: [users@httpd] Is it possible to evaluate .htaccess before proxying requests? (Apache 2.4.9)
Date Mon, 19 May 2014 11:30:57 GMT

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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message