You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by as...@apache.org on 1999/07/01 09:27:57 UTC

Re: mod_perl/4488: mod_perl breaks mod_proxy on self access

[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]


Synopsis: mod_perl breaks mod_proxy on self access

State-Changed-From-To: open-feedback
State-Changed-By: ask
State-Changed-When: Thu Jul  1 00:27:56 PDT 1999
State-Changed-Why:
Does the behavior change if you don't compile the apache with mod_perl and then compile with mod_perl but don't include anything in the configuration?

What do you mean "the proxy server and the http server runs on the same port"? Do you only run one server?



Re: mod_perl/4488: mod_perl breaks mod_proxy on self access

Posted by "Azuma,Takao" <ec...@ecodacs.or.jp>.
ask@apache.org wrote:
>Does the behavior change if you don't compile the apache with mod_perl and then compile with mod_perl but don't include anything in the configuration?
Yes. (Please see below)

>What do you mean "the proxy server and the http server runs on the same port"? Do you only run one server?
I'm sorry for my bad English.
It means that:
  I run only one server on a "dual homed" machine.
  It's main purpose is the www server for outside (=for the Internet).
  Simultaneously, it serves proxy for our intra-net.

So, I configured the server like below, but it not runs the way what I aimed.
Today, I retried in whole on my linux-2.0.37 box:

Apache-1.3.6 vanilla:
  tar -xzvf apache_1.3.6.tar.gz
  cd apache_1.3.6
  ./configure --prefix=/usr/local/apache.vanilla --enable-module=proxy
  make && make install

Apache-1.3.6 with mod_perl-1.19:
  tar -xzvf apache_1.3.6.tar.gz
  tar -xzvf mod_perl-tar.gz
  cd mod_perl-1.19
  perl Makefile.PL DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 \
  APACI_ARGS='--prefix=/usr/local/apache.modperl --enable-module=proxy'
  make && make install

Then, gave them same config.
I changed only these 3 lines from "httpd.conf.default":

  Port 80
  ServerName myhost
  ProxyRequests On

Name "myhost" is defined as 192.168.0.1 in /etc/hosts, and
"mywww" is also defined as 192.168.0.1 in /etc/hosts.

And here is the result:

===[[ Apache-1.3.6 vanilla ]]===========================================
  myhost:/usr/local/apache.vanilla/conf# ../bin/apachectl start
  ../bin/apachectl start: httpd started

  myhost:/usr/local/apache.vanilla/conf# telnet localhost 80
  Trying 127.0.0.1...
  Connected to localhost.
  Escape character is '^]'.
  GET http://myhost/ HTTP/1.0                         <---- TRY "myhost"
  
  HTTP/1.1 200 OK                                     <---- OK!
  Date: Fri, 02 Jul 1999 01:05:40 GMT
  Server: Apache/1.3.6 (Unix)
  Last-Modified: Wed, 20 May 1998 14:59:42 GMT
  ETag: "2712f-656-3562efde"
  Accept-Ranges: bytes
  Content-Length: 1622
  Connection: close
  Content-Type: text/html
  
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  <HTML>
   <HEAD>
    <TITLE>Test Page for Apache Installation on Web Site</TITLE>
*** snip ***
  </HTML>
  Connection closed by foreign host.

  myhost:/usr/local/apache.vanilla/conf# telnet localhost 80
  Trying 127.0.0.1...
  Connected to localhost.
  Escape character is '^]'.
  GET http://mywww/ HTTP/1.0                          <---- TRY "mywww"
  
  HTTP/1.0 200 OK                                     <---- OK!
  Date: Fri, 02 Jul 1999 01:17:19 GMT
  Server: Apache/1.3.6 (Unix)
  Last-Modified: Wed, 20 May 1998 14:59:42 GMT
  ETag: "2712f-656-3562efde"
  Accept-Ranges: bytes
  Content-Length: 1622
  Content-Type: text/html
  
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  <HTML>
   <HEAD>
    <TITLE>Test Page for Apache Installation on Web Site</TITLE>
*** snip ***
  </HTML>
  Connection closed by foreign host.
------------------------------------------------------------------------

===[[ Apache-1.3.6 with mod_perl-1.19 ]]================================
  myhost:/usr/local/apache.modperl/conf# ../bin/apachectl start
  ../bin/apachectl start: httpd started

  myhost:/usr/local/apache.modperl/conf# telnet localhost 80
  Trying 127.0.0.1...
  Connected to localhost.
  Escape character is '^]'.
  GET http://myhost/ HTTP/1.0                         <---- TRY "myhost"
  
  HTTP/1.0 404 Not Found                              <---- NG!!!
  Date: Fri, 02 Jul 1999 01:22:13 GMT
  Server: Apache/1.3.6 (Unix) mod_perl/1.19
  Connection: close
  Content-Type: text/html
  
  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
  <HTML><HEAD>
  <TITLE>404 Not Found</TITLE>
  </HEAD><BODY>
  <H1>Not Found</H1>
  The requested URL http://myhost/ was not found on this server.<P>
  <HR>
  <ADDRESS>Apache/1.3.6 Server at myhost Port 80</ADDRESS>
  </BODY></HTML>
  Connection closed by foreign host.

  myhost:/usr/local/apache.modperl/conf# telnet localhost 80
  Trying 127.0.0.1...
  Connected to localhost.
  Escape character is '^]'.
  GET http://mywww/ HTTP/1.0                         <---- TRY "mywww"
  
  HTTP/1.0 200 OK                                    <---- OK!
  Date: Fri, 02 Jul 1999 01:23:35 GMT
  Server: Apache/1.3.6 (Unix) mod_perl/1.19
  Last-Modified: Wed, 20 May 1998 14:59:42 GMT
  ETag: "2713a-656-3562efde"
  Accept-Ranges: bytes
  Content-Length: 1622
  Content-Type: text/html
  
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  <HTML>
   <HEAD>
    <TITLE>Test Page for Apache Installation on Web Site</TITLE>
*** snip ***
  </HTML>
  Connection closed by foreign host.
------------------------------------------------------------------------
When returned "404 Not Found", the error_log shows this:

  [Fri Jul  2 10:22:15 1999] [error] [client 127.0.0.1] File does not exist: http://myhost/

It seems that the server missed to select proper handler for the request.

Is this helps you?

-- 
Azuma, Takao
kaokun@ecodacs.or.jp