RE: [users@httpd] ProxyPass does not work with hostnamesonlyIP's.(mod_proxyApache 1.3)

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

 



I cleared all my logs and restarted the server. Tried accessing the
page twice with same error. It appears the requests never reach the
backend server.

Here are the full contents of my logs.
------------------------------------
proxy: access_log
---
talk.foo.org 10.5.5.50 - - [17/Jan/2006:00:25:00 +1030] "GET / HTTP/1.1" 500 2
86 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)
Gecko/20051111 F
irefox/1.5"
talk.foo.org 10.5.5.50 - - [17/Jan/2006:00:25:50 +1030] "GET / HTTP/1.1" 500 2
86 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)
Gecko/20051111 F
irefox/1.5"
------------------------------------
proxy: error_log
---
[Tue Jan 17 00:24:45 2006] [notice] Initializing etag from
/var/www/logs/etag-state
[Tue Jan 17 00:24:45 2006] [notice] chrooted in /var/www
[Tue Jan 17 00:24:45 2006] [notice] changed to uid 1001, gid 1001
[Tue Jan 17 00:24:45 2006] [notice] Apache/1.3.29 (Unix) mod_ssl/2.8.16
OpenSSL/
0.9.7g configured -- resuming normal operations
[Tue Jan 17 00:24:45 2006] [info] Server built: unknown
[Tue Jan 17 00:24:45 2006] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Tue Jan 17 00:25:00 2006] [debug] proxy_cache.c(0): No CacheRoot, so
no caching
. Declining.
[Tue Jan 17 00:25:50 2006] [debug] proxy_cache.c(0): No CacheRoot, so
no caching
. Declining.
------------------------------------
proxy: rewrite_log
---
10.5.5.50 - - [17/Jan/2006:00:25:00 +1030] [talk.foo.org/sid#4eba0018][rid#4e3
b4060/initial] (2) init rewrite engine with requested uri /
10.5.5.50 - - [17/Jan/2006:00:25:00 +1030] [talk.foo.org/sid#4eba0018][rid#4e3
b4060/initial] (3) applying pattern '^(/.*)$' to uri '/'
10.5.5.50 - - [17/Jan/2006:00:25:00 +1030] [talk.foo.org/sid#4eba0018][rid#4e3
b4060/initial] (2) rewrite / -> http://internal.foo.org/
10.5.5.50 - - [17/Jan/2006:00:25:00 +1030] [talk.foo.org/sid#4eba0018][rid#4e3
b4060/initial] (2) forcing proxy-throughput with http://internal.foo.org/
10.5.5.50 - - [17/Jan/2006:00:25:00 +1030] [talk.foo.org/sid#4eba0018][rid#4e3
b4060/initial] (1) go-ahead with proxy request
proxy:http://internal.foo.org/ [OK]
10.5.5.50 - - [17/Jan/2006:00:25:50 +1030] [talk.foo.org/sid#4eba0018][rid#4e3
b4060/initial] (2) init rewrite engine with requested uri /
10.5.5.50 - - [17/Jan/2006:00:25:50 +1030] [talk.foo.org/sid#4eba0018][rid#4e3
b4060/initial] (3) applying pattern '^(/.*)$' to uri '/'
10.5.5.50 - - [17/Jan/2006:00:25:50 +1030] [talk.foo.org/sid#4eba0018][rid#4e3
b4060/initial] (2) rewrite / -> http://internal.foo.org/
10.5.5.50 - - [17/Jan/2006:00:25:50 +1030] [talk.foo.org/sid#4eba0018][rid#4e3
b4060/initial] (2) forcing proxy-throughput with http://internal.foo.org/
10.5.5.50 - - [17/Jan/2006:00:25:50 +1030] [talk.foo.org/sid#4eba0018][rid#4e3
b4060/initial] (1) go-ahead with proxy request
proxy:http://internal.foo.org/ [OK]
------------------------------------
internal.foo.org: access_log
---
***EMPTY***
------------------------------------
internal.foo.org: error_log
---
[Tue Jan 17 00:24:51 2006] [notice] Initializing etag from
/var/www/logs/etag-state
[Tue Jan 17 00:24:51 2006] [notice] chrooted in /var/www
[Tue Jan 17 00:24:51 2006] [notice] changed to uid 1009, gid 1009
[Tue Jan 17 00:24:51 2006] [notice] Apache/1.3.29 (Unix) PHP/5.0.4
mod_ssl/2.8.1
6 OpenSSL/0.9.7g configured -- resuming normal operations
[Tue Jan 17 00:24:51 2006] [notice] Accept mutex: sysvsem (Default: sysvsem)
------------------------------------

(Only changed actual domain with foo.org but everything else unchanged).

Quoting Axel-Stéphane  SMORGRAV <Axel-Stephane.SMORGRAV@xxxxxxxxxxxxxx>:

Well, it seems to me like that request worked just fine. No DNS
lookup problem here. Does the request actually reach the backend
server (intranet.foo.org) ?

Could you share the relevant parts of your access and error logs +/-
30 seconds?

-ascs

-----Original Message-----
From: bsdsec@xxxxxxxxxxxxxxxxxxxxxx [mailto:bsdsec@xxxxxxxxxxxxxxxxxxxxxx]
Sent: Monday, January 16, 2006 2:27 PM
To: Axel-Stéphane SMORGRAV
Cc: users@xxxxxxxxxxxxxxxx
Subject: RE: [users@httpd] ProxyPass does not work with
hostnamesonlyIP's.(mod_proxyApache 1.3)

Does that rewrite rule do exactly the same as ProxyPass? Anyway, same
error page produced. Here is the rewrite_log:

10.5.5.50 - - [16/Jan/2006:23:53:23 +1030]
[talk.boehj.net/sid#43ad8018][rid#417
0f060/initial] (2) init rewrite engine with requested uri /
10.5.5.50 - - [16/Jan/2006:23:53:23 +1030]
[talk.boehj.net/sid#43ad8018][rid#417
0f060/initial] (3) applying pattern '^(/.*)$' to uri '/'
10.5.5.50 - - [16/Jan/2006:23:53:23 +1030]
[talk.boehj.net/sid#43ad8018][rid#417
0f060/initial] (2) rewrite / -> http://intranet.foo.org/
10.5.5.50 - - [16/Jan/2006:23:53:23 +1030]
[talk.boehj.net/sid#43ad8018][rid#417
0f060/initial] (2) forcing proxy-throughput with http://intranet.foo.org/
10.5.5.50 - - [16/Jan/2006:23:53:23 +1030]
[talk.boehj.net/sid#43ad8018][rid#417
0f060/initial] (1) go-ahead with proxy request
proxy:http://intranet.foo.org/ [O
K]

Any ideas?

Quoting Axel-Stéphane  SMORGRAV <Axel-Stephane.SMORGRAV@xxxxxxxxxxxxxx>:

Debug-level logs do not help much for debugging problems within
mod_proxy. Try replacing the ProxyPass with the equivalent
RewriteRule.

RewriteLog log/rewrite_log
RewriteLogLevel 3
RewriteEngine On

RewriteRule ^(/.*)$ http://intranet.foo.org$1 [P,L]
ProxyPassReverse / http://intranet.foo.org/

You should now get some pretty detailed logs about what is happening.

-ascs

-----Original Message-----
From: bsdsec@xxxxxxxxxxxxxxxxxxxxxx [mailto:bsdsec@xxxxxxxxxxxxxxxxxxxxxx]
Sent: Monday, January 16, 2006 2:10 PM
To: Axel-Stéphane SMORGRAV
Cc: users@xxxxxxxxxxxxxxxx
Subject: RE: [users@httpd] ProxyPass does not work with hostnames
onlyIP's.(mod_proxyApache 1.3)

Hey, thanks for your help. I tried ping, nslookup which both work. I
even tried lynx and was able to bring up the page directly.

I set LogLevel to "debug" and had a look in my error.log:

[Mon Jan 16 23:28:23 2006] [notice] Apache/1.3.29 (Unix) mod_ssl/2.8.16
OpenSSL/
0.9.7g configured -- resuming normal operations
[Mon Jan 16 23:28:23 2006] [info] Server built: unknown
[Mon Jan 16 23:28:23 2006] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Mon Jan 16 23:28:26 2006] [debug] proxy_cache.c(0): Request for
http://internal.foo.org/favicon.ico, pragma_req=(unset), ims=0
[Mon Jan 16 23:28:26 2006] [debug] proxy_util.c(0): File
/var/cache/Q/S/j/EGecnq
Rx1ZGkeYQFKdg not found
[Mon Jan 16 23:28:26 2006] [debug] proxy_cache.c(0): Local copy not
present or e
xpired. Declining.
[Mon Jan 16 23:28:27 2006] [debug] proxy_cache.c(0): Request for
http://internal.foo.org/, pragma_req=(unset), ims=0
[Mon Jan 16 23:28:27 2006] [debug] proxy_util.c(0): File
/var/cache/j/T/K/B2vn9W
jcAum7mKEWvdw not found
[Mon Jan 16 23:28:27 2006] [debug] proxy_cache.c(0): Local copy not
present or e
xpired. Declining.
-------------------------------

Is all I get. I got the idea that maybe it was the caching that was the
problem so I took out all caching directives then restarted apache and
got a log like this:

[Mon Jan 16 23:29:36 2006] [notice] Apache/1.3.29 (Unix) mod_ssl/2.8.16
OpenSSL/
0.9.7g configured -- resuming normal operations
[Mon Jan 16 23:29:36 2006] [info] Server built: unknown
[Mon Jan 16 23:29:36 2006] [notice] Accept mutex: sysvsem (Default: sysvsem)
[Mon Jan 16 23:29:43 2006] [debug] proxy_cache.c(0): No CacheRoot, so
no caching
. Declining.
-------------------------------

With the same result... FYI when I set ProxyPass to an IP (which works)
my error log shows:

[Mon Jan 16 23:36:31 2006] [debug] proxy_cache.c(0): Request for
http://172.16.0.5/, pragma_req=(unset), ims=0
[Mon Jan 16 23:36:31 2006] [debug] proxy_util.c(0): File
/var/cache/4/g/H/NhiNLMZwLXwWY9wfp2w not found
[Mon Jan 16 23:36:31 2006] [debug] proxy_cache.c(0): Local copy not
present or expired. Declining.
[Mon Jan 16 23:36:31 2006] [debug] proxy_cache.c(0): Response is not
cacheable, unlinking /var/cache/4/g/H/NhiNLMZwLXwWY9wfp2w
[Mon Jan 16 23:36:31 2006] [debug] proxy_http.c(0): Content-Type: text/html
[Mon Jan 16 23:36:31 2006] [debug] proxy_cache.c(0): Request for
http://172.16.0.1/favicon.ico, pragma_req=(unset), ims=0
[Mon Jan 16 23:36:31 2006] [debug] proxy_cache.c(0): Unexpired data
available
[Mon Jan 16 23:36:31 2006] [debug] proxy_cache.c(0): Local copy
modified, send it
-------------------------------

Sorry about the ugly formatting! It's horrible to post logs =/

-pat


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx







---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx






---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-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