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 2014/10/03 22:38:11 UTC
[Bug 57056] New: Rewrite port is taken into hostname
https://issues.apache.org/bugzilla/show_bug.cgi?id=57056
Bug ID: 57056
Summary: Rewrite port is taken into hostname
Product: Apache httpd-2
Version: 2.4.10
Hardware: PC
OS: Windows XP
Status: NEW
Severity: major
Priority: P2
Component: mod_rewrite
Assignee: bugs@httpd.apache.org
Reporter: bgrh@mail.ru
My goal is to write proxy, which will proxy all requests to the VPN.
So, I've written the following configuration:
<VirtualHost *:8121>
RewriteEngine On
ErrorLog logs/misc-error_log
TransferLog logs/misc-access_log
RewriteRule ^/(.*) http://%{HTTP_HOST}:8121/$1 [P]
</VirtualHost>
However, for some reason, it's not working as expected.
It seems that it tries to resolve '%{HTTP_HOST}:8121' as host name.
Browser answer is
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.
Reason: DNS lookup failure for: n01wmw202:8121
Log error contains the same entry
[Sat Oct 04 07:34:34.123051 2014] [proxy:error] [pid 4004:tid 1260] [client
192.168.33.148:64292] AH00898: DNS lookup failure for: n01wmw202:8121 returned
by /
If I remove ':8121' everything is working as expected.
--
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 57056] Rewrite port is taken into hostname
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57056
--- Comment #1 from Danila Galimov <bg...@mail.ru> ---
It also reproduces if i change it to
RewriteRule ^/(.*) http://%{HTTP_HOST}:%{SERVER_PORT}/$1 [P]
--
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