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

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

 



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

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

What was I thinking - since it worked with the IP address.

It does say "Host not found". Make sure that your host is able to
resolve the FQDN of the backend server (nslookup intranet.foo.org, or
ping intranet.foo.org). Also check the (error) logs to see exactly
what URL produced the 500 error to make sure that it is not the
consequence of a redirect.

-ascs

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

Sorry I forgot to mention, OpenBSD comes with Apache 1.3 by default.
I'm using APche 1.3

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

I will assume that you are using Apache 2.0 or newer. In that case, in
addition to mod_proxy, you need to include the mod_proxy_http module.

-ascs

-----Original Message-----
From: bsdsec@xxxxxxxxxxxxxxxxxxxxxx
[mailto:bsdsec@xxxxxxxxxxxxxxxxxxxxxx]
Sent: Monday, January 16, 2006 1:41 PM
To: users@xxxxxxxxxxxxxxxx
Subject: [users@httpd] ProxyPass does not work with hostnames only
IP's. (mod_proxyApache 1.3)

Hi!

I'm using OpenBSD 3.8 default install with mod_proxy enabled. I use
ProxyPass in virtual host directives with success. Example:

<VirtualHost 10.5.5.20>
   ServerName www.foo.org
   ProxyPass / http://172.16.0.5/
   ProxyPassReverse / http://172.16.0.5/
   <Location />
      Order deny,allow
      Allow from all
   </Location>
</VirtualHost>

...which works fine! The problem occurs when I want to use a hostname
instead of an IP, e.g.:

ProxyPass / http://intranet.foo.org/
ProxyPassReverse / http://intranet.foo.org/

All I get is a "500 Proxy Error" page:
-------------------------------------------------
Proxy Error
The proxy server could not handle the request GET /.

Reason: Host not found
-------------------------------------------------

Every page I've read seems to indicate you can use hostnames in
ProxyPass directive. The proxy can resolve "intranet.foo.org" and
access the webpage at that address just fine. It simply wont proxy to
it!

Any help would be appreciated.

Thanks,

Patrick Halimee









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