httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From René Clerc <>
Subject [users@httpd] Apache 1.3 VirtualHost in combo with rewrite
Date Thu, 02 Oct 2003 12:08:58 GMT
Hi all,

I have a problem which, AFAICT, can be solved using VirtualHosts, but
I just haven't yet found out how ;-)

We've built a Tomcat application that needs to be accessible through
Apache (1.3).  If a user accesses, let's say,,
Apache redirects the user to the Tomcat application (running on port
8080).  If a user tries to access, which resolves
to the same IP address, the user will *not* be redirected, but served
an error page.  In fact, I want this to happen when the user types
anything *but* (including the direct IP address).

The proxying and rewriting between Apache and Tomcat works great,
using mod_rewrite and mod_proxy.  It's just these accessibility
demands I recently came up with, that I can't get to work.  I've

    ErrorDocument 500 /error500.html
    RewriteEngine On
    RewriteCond $1 !error
    RewriteRule (.*) http://localhost:8080/$1 [P]
    ProxyPassReverse / http://localhost:8080/

<VirtualHost _default_:*>
    DocumentRoot /var/www/html

and probably most variations in order, changing _default_ to either the
IP address or, but nothing worked:  currently, no matter
what the user types in, (s)he's always redirected to the Tomcat

Am I on the right track?  Does anybody know how to solve my problem?

Thanks in advance,

René Clerc                      - ( - PGP: 0x9ACE0AC7

228. If the hero claims he wishes to confess in public or to me
     personally, I will remind him that a notarized deposition will
     serve just as well.

-"Peter Anspach's list of things to do as an Evil Overlord"

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message