tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pid *" <>
Subject Re: Hosted environment
Date Fri, 23 Dec 2011 17:43:47 GMT
> Sigh, it's not the gospel according to <epithet> Mr. Eggers :-p.

I mock you not sir.


> I just read and follow instructions / source code / information on the 'net / snappy
answers to my not so bright questions. Once I figure it all out (TM), I'll write it up and
post on a Wiki somewhere.
> Here's how I understand things to work. Corrections happily accepted.
> Browser <-- HTTP --> Apache HTTPD <-- (assume) AJP --> Tomcat
> 1. A browser requests a URL and it ends up on the Apache HTTPD server (DNS, etc.)
> 2. Apache HTTPD does this:
>    a. Do I have NamedVirtualHost configured?
>    b. Do I have a ServerName or ServerAlias match?
>       1. If I match, route to the appropriate virtual host
>       2. If I don't match, serve from my default configuration
>    c. In the virtual host
>       1. Is there a matching JkMount - send it off to Tomcat
>       2. If there is no matching JkMount - process locally
> 3. In Tomcat
>    a. Do I have a matching <Host> or <Alias> entry in server.conf
>       1. If so, send the request to that
>       2. If not, send the request to the default host (by default localhost)
>    b. Process the request
>    c. Send the results back via AJP to Apache HTTPD
> 4. In Apache HTTPD
>    a. Accept AJP stream from Tomcat
>    b. Send back to browser as HTTP
> In short, you need to make sure you have a match between the named virtual host in Apache
HTTPD's httpd.conf and the virtual host in Tomcat's server.xml. Match a server alias in Apache
HTTPD's httpd.conf with an alias element in Tomcat's server.xml.
> You can actually play games with wild card matches, but then cookie paths might become
confusing. There was a discussion about this on the mailing list a while ago.
> As for external access, you'll have to register each domain name so that DNS resolves
to the correct IP address.
> . . . . just my two cents.
> /mde/
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message