Hi

    I experience some problem with apache, mod_rewrite and mod_proxy.
    I get some timeouts that deny access to the server.
    Here is the error message I get:

    (70007)The timeout specified has expired: proxy: error reading
    status line from remote server XXX
    [Wed Nov 17 11:57:09 2010] [error] [client 130.223.50.57] proxy:
    Error reading from remote server returned by
    /YYY/yyy;jsessionid=CB0770CE21131F029565895AC72B921E


    It happens when I set this particular rule:
    RewriteRule ^/YYY/yyy(.+)  /YYY/yyy$1  [P]

To me, this rule doesn't make sense. You are rewriting it to be the same
thing as before.

This rule looks weird in my opinion also; but works properly on our development server.

It must be: get the whole URL, but YYY/yyy, and do the mapping.
Something like
    RewriteRule ^/([^YYY/yyy].+)  /YYY/yyy$1  [P]


The redirection is on the same server, within the same virtual host.
http://XXX/?smth   would be    http://XXX/YYY/yyy?smth
(XXX is abc.ch)

And both URLs must work.

    In fact, I want to mask YYY/yyy in URLs, and create an internal,
    silent, redirection.
    e.g.: http://abc.ch/?smth
    would be in fact
    http://XXX/YYY/yyy?smth

you are reverse proxying from a different host then that host should get
mentioned in the rule.

E.g
NameVirtualHost *:80

<VirtualHost *:80?
ServerName abc.ch <http://abc.ch>

RewriteEngine on
RewriteRule / http://XXX/YYY/yyy/ [P,QSA]

</VirtualHost>

QSA would add the query string from the original URL to the rewritten URL.

    Maybe I do something wrong. The rule could certainly be more
    properly written.
    But on our development server, I don't get the problem (but apache
    versions and configurations are a bit different).


    Any idea ?

--
Sébastien Moretti

---------------------------------------------------------------------
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-unsubscr...@httpd.apache.org
  "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to