>Number: 4488 >Category: mod_perl >Synopsis: mod_perl breaks mod_proxy on self access >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Thu May 27 20:30:00 PDT 1999 >Last-Modified: >Originator: [EMAIL PROTECTED] >Organization: apache >Release: 1.3.6 >Environment: mod_perl-1.19 Apache is compiled with mod-proxy and mod-perl. >Description: When comiled with mod_perl, apache's http proxy cannot access correctly the host which name specified with "ServerName" directive. >How-To-Repeat: Let the server have two names: myhost and myalias (in /etc/hosts) Http server and http proxy are on the same port (80) sample httpd.conf: Servername myhost ProxyRequests On (other settings are omitted)
then request: GET / HTTP/1.0 : OK GET http://myalias/ HTTP/1.0 : OK GET http://myhost/ HTTP/1.0 : NG (error_log: "File does not exist: http://myhost/") >Fix: This patch can workaround this. (but I think not a "true fix") --------- *** mod_proxy.c.orig Sat Jan 2 04:05:02 1999 --- mod_proxy.c Thu Feb 25 17:58:49 1999 *************** *** 149,163 **** --- 149,167 ---- if (conf->req && r->parsed_uri.scheme) { /* but it might be something vhosted */ + /* if (!(r->parsed_uri.hostname && !strcasecmp(r->parsed_uri.scheme, ap_http_method(r)) && ap_matches_request_vhost(r, r->parsed_uri.hostname, r->parsed_uri.port_str ? r->parsed_uri.port : ap_default_port(r)))) { + */ r->proxyreq = 1; r->uri = r->unparsed_uri; r->filename = ap_pstrcat(r->pool, "proxy:", r->uri, NULL); r->handler = "proxy-server"; + /* } + */ } /* We need special treatment for CONNECT proxying: it has no scheme part */ else if (conf->req && r->method_number == M_CONNECT >Audit-Trail: >Unformatted: [In order for any reply to be added to the PR database, you need] [to include <[EMAIL PROTECTED]> in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database 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! ]