You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2012/03/18 00:45:22 UTC
DO NOT REPLY [Bug 52935] New: ProxyPass SetEnvIf interpolation
worked in 2.2
https://issues.apache.org/bugzilla/show_bug.cgi?id=52935
Bug #: 52935
Summary: ProxyPass SetEnvIf interpolation worked in 2.2
Product: Apache httpd-2
Version: 2.4.1
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_proxy_http
AssignedTo: bugs@httpd.apache.org
ReportedBy: petterb@gmail.com
Classification: Unclassified
Responds with '404 Not Found',
Works in 2.2.22, same config.
Works fine without env (ProxyPass / http;//duckduckgo.com/)
$ cat /usr/local/apache2/conf/extra/httpd-vhosts.conf
LogLevel proxy:trace8
<VirtualHost _default_:80>
# SetEnv duck duckduckgo.com
SetEnvIf Request_URI ".*" duck=duckduckgo.com
# RewriteEngine On
# RewriteRule ^ - [E=duck:duckduckgo.com]
ProxyRequests Off
ProxyPassInterpolateEnv On
ProxyPass / http://${duck}/ interpolate
# ProxyPass / http://duckduckgo.com/
# Header set duck "%{duck}e on 2.4.1"
</VirtualHost>
$ sudo /usr/local/apache2/bin/apachectl -k start; tail -fn0
/usr/local/apache2/logs/error_log
[Sun Mar 18 00:39:33.582614 2012] [core:warn] [pid 14233:tid 140214237484864]
AH00111: Config variable ${duck} is not defined
[Sun Mar 18 00:39:33.590089 2012] [proxy:debug] [pid 14236:tid 140214237484864]
proxy_util.c(1640): AH00925: initializing worker proxy:reverse shared
[Sun Mar 18 00:39:33.590134 2012] [proxy:debug] [pid 14236:tid 140214237484864]
proxy_util.c(1680): AH00927: initializing worker proxy:reverse local
[Sun Mar 18 00:39:33.590172 2012] [mpm_event:notice] [pid 14234:tid
140214237484864] AH00489: Apache/2.4.1 (Unix) configured -- resuming normal
operations
[Sun Mar 18 00:39:33.590189 2012] [mpm_event:info] [pid 14234:tid
140214237484864] AH00490: Server built: Mar 15 2012 14:52:12
[Sun Mar 18 00:39:33.590195 2012] [proxy:debug] [pid 14236:tid 140214237484864]
proxy_util.c(1712): AH00930: initialized pool in child 14236 for (*) min=0
max=25 smax=25
[Sun Mar 18 00:39:33.590206 2012] [proxy:debug] [pid 14236:tid 140214237484864]
proxy_util.c(1640): AH00925: initializing worker http://${duck}/ shared
[Sun Mar 18 00:39:33.590220 2012] [proxy:debug] [pid 14236:tid 140214237484864]
proxy_util.c(1680): AH00927: initializing worker http://${duck}/ local
[Sun Mar 18 00:39:33.590221 2012] [core:notice] [pid 14234:tid 140214237484864]
AH00094: Command line: '/usr/local/apache2/bin/httpd'
[Sun Mar 18 00:39:33.590241 2012] [proxy:debug] [pid 14236:tid 140214237484864]
proxy_util.c(1712): AH00930: initialized pool in child 14236 for (${duck})
min=0 max=25 smax=25
[Sun Mar 18 00:39:33.590236 2012] [proxy:debug] [pid 14237:tid 140214237484864]
proxy_util.c(1640): AH00925: initializing worker proxy:reverse shared
[Sun Mar 18 00:39:33.590266 2012] [proxy:debug] [pid 14237:tid 140214237484864]
proxy_util.c(1680): AH00927: initializing worker proxy:reverse local
[Sun Mar 18 00:39:33.590313 2012] [proxy:debug] [pid 14237:tid 140214237484864]
proxy_util.c(1712): AH00930: initialized pool in child 14237 for (*) min=0
max=25 smax=25
[Sun Mar 18 00:39:33.590347 2012] [proxy:debug] [pid 14237:tid 140214237484864]
proxy_util.c(1640): AH00925: initializing worker http://${duck}/ shared
[Sun Mar 18 00:39:33.590366 2012] [proxy:debug] [pid 14237:tid 140214237484864]
proxy_util.c(1680): AH00927: initializing worker http://${duck}/ local
[Sun Mar 18 00:39:33.590379 2012] [proxy:debug] [pid 14237:tid 140214237484864]
proxy_util.c(1712): AH00930: initialized pool in child 14237 for (${duck})
min=0 max=25 smax=25
[Sun Mar 18 00:39:33.590567 2012] [proxy:debug] [pid 14238:tid 140214237484864]
proxy_util.c(1640): AH00925: initializing worker proxy:reverse shared
[Sun Mar 18 00:39:33.590596 2012] [proxy:debug] [pid 14238:tid 140214237484864]
proxy_util.c(1680): AH00927: initializing worker proxy:reverse local
[Sun Mar 18 00:39:33.590640 2012] [proxy:debug] [pid 14238:tid 140214237484864]
proxy_util.c(1712): AH00930: initialized pool in child 14238 for (*) min=0
max=25 smax=25
[Sun Mar 18 00:39:33.590651 2012] [proxy:debug] [pid 14238:tid 140214237484864]
proxy_util.c(1640): AH00925: initializing worker http://${duck}/ shared
[Sun Mar 18 00:39:33.590663 2012] [proxy:debug] [pid 14238:tid 140214237484864]
proxy_util.c(1680): AH00927: initializing worker http://${duck}/ local
[Sun Mar 18 00:39:33.590687 2012] [proxy:debug] [pid 14238:tid 140214237484864]
proxy_util.c(1712): AH00930: initialized pool in child 14238 for (${duck})
min=0 max=25 smax=25
[Sun Mar 18 00:39:38.202264 2012] [core:info] [pid 14237:tid 140214135572224]
[client ::1:60421] AH00128: File does not exist: proxy:http://duckduckgo.com/
$ /usr/local/apache2/bin/apachectl -V
Server version: Apache/2.4.1 (Unix)
Server built: Mar 15 2012 14:52:12
Server's Module Magic Number: 20120211:0
Server loaded: APR 1.4.5, APR-UTIL 1.4.1
Compiled using: APR 1.4.5, APR-UTIL 1.4.1
Architecture: 64-bit
Server MPM: event
threaded: yes (fixed thread count)
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
$ cat config.nice
#! /bin/sh
#
# Created by configure
"./configure" \
"$@"
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 52935] ProxyPass SetEnvIf interpolation worked in
2.2
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52935
--- Comment #4 from Petter Berntsen <pe...@gmail.com> 2012-03-19 14:25:16 UTC ---
I actually got recurring Segmentation fault's when i also removed the statement
from within 'if (!reverse)'. So, i kept that one.
[core:notice] [pid 22626:tid 139771204532032] AH00052: child pid 25078 exit
signal Segmentation fault (11)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 52935] ProxyPass SetEnvIf interpolation worked in
2.2
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52935
Ruediger Pluem <rp...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mail@stephan-jansen.eu
--- Comment #2 from Ruediger Pluem <rp...@apache.org> 2012-03-19 13:48:38 UTC ---
*** Bug 52902 has been marked as a duplicate of this bug. ***
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 52935] ProxyPass SetEnvIf interpolation worked in
2.2
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52935
Steve Podell <sp...@iii.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |spodell@iii.com
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 52935] ProxyPass SetEnvIf interpolation worked in
2.2
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52935
--- Comment #6 from Petter Berntsen <pe...@gmail.com> 2012-03-19 16:01:30 UTC ---
Sure thing :)
Just throwing in a couple unimportant code suggestions to avoid setting
'conf-reverse' twice the first round.
1. Delete 'conf->reverse = reverse;' from if block and send 'reverse' rather
than 'conf->reverse' to ap_proxy_initialize_worker()
2. Put the second 'conf->reverse = reverse;' in an else block
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 52935] ProxyPass SetEnvIf interpolation worked in
2.2
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52935
Ruediger Pluem <rp...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |FixedInTrunk,
| |PatchAvailable
--- Comment #3 from Ruediger Pluem <rp...@apache.org> 2012-03-19 13:55:51 UTC ---
(In reply to comment #1)
> Seem to have found a fix in mod_proxy.c child_init(). By adding the line:
>
> conf->reverse = reverse;
>
> to the end of the while loop. (As it is in httpd 2.2.22).
>
>
> Otherwise it would fail to find a reverse proxy worker in proxy.util.c
> ap_proxy_pre_request(), because conf->reverse would be NULL.
> And then proxy_handler() would return HTTP_SERVICE_UNAVAILABLE.
Thanks for the pointers. I committed a slightly modified version to trunk as
r1302444.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
[Bug 52935] ProxyPass SetEnvIf interpolation worked in 2.2
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52935
Stefan Fritsch <sf...@sfritsch.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Stefan Fritsch <sf...@sfritsch.de> ---
fixed in 2.4.2
--
You are receiving this mail because:
You are the assignee for the bug.
DO NOT REPLY [Bug 52935] ProxyPass SetEnvIf interpolation worked in
2.2
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52935
--- Comment #1 from Petter Berntsen <pe...@gmail.com> 2012-03-19 13:19:55 UTC ---
Seem to have found a fix in mod_proxy.c child_init(). By adding the line:
conf->reverse = reverse;
to the end of the while loop. (As it is in httpd 2.2.22).
Otherwise it would fail to find a reverse proxy worker in proxy.util.c
ap_proxy_pre_request(), because conf->reverse would be NULL.
And then proxy_handler() would return HTTP_SERVICE_UNAVAILABLE.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org
DO NOT REPLY [Bug 52935] ProxyPass SetEnvIf interpolation worked in
2.2
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52935
--- Comment #5 from Ruediger Pluem <rp...@apache.org> 2012-03-19 14:52:46 UTC ---
(In reply to comment #4)
> I actually got recurring Segmentation fault's when i also removed the statement
> from within 'if (!reverse)'. So, i kept that one.
>
>
> [core:notice] [pid 22626:tid 139771204532032] AH00052: child pid 25078 exit
> signal Segmentation fault (11)
Thanks for pointing this out. I was a little bit quick with my modification.
Fixed in r1302483.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org