Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 9706 invoked from network); 31 Mar 2011 00:01:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Mar 2011 00:01:40 -0000 Received: (qmail 22393 invoked by uid 500); 30 Mar 2011 22:57:35 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 22340 invoked by uid 500); 30 Mar 2011 22:57:35 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 22331 invoked by uid 99); 30 Mar 2011 22:57:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Mar 2011 22:57:35 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [80.67.31.38] (HELO smtprelay04.ispgateway.de) (80.67.31.38) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Mar 2011 22:57:28 +0000 Received: from [93.104.110.190] (helo=linux-m8sc.site) by smtprelay04.ispgateway.de with esmtpa (Exim 4.68) (envelope-from ) id 1Q54K3-0003AE-UY for users@tomcat.apache.org; Thu, 31 Mar 2011 00:57:08 +0200 Date: Thu, 31 Mar 2011 00:57:06 +0200 From: Tobias Crefeld To: users@tomcat.apache.org Subject: Re: virtual host for apache/tomcat server Message-ID: <20110331005706.62b0867c@linux-m8sc.site> In-Reply-To: <1301512152.13134.40.camel@storage.obrien-pifer.com> References: <1301510203.13134.34.camel@storage.obrien-pifer.com> <4D937C0C.2030701@christopherschultz.net> <1301512152.13134.40.camel@storage.obrien-pifer.com> Organization: Cataneo GmbH X-Mailer: Claws Mail 3.7.8 (GTK+ 2.20.1; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Df-Sender: tc@cataneo.de X-Virus-Checked: Checked by ClamAV on apache.org Am Wed, 30 Mar 2011 15:09:12 -0400 schrieb James Pifer : > =EF=BB=BFOk, my httpd.conf is pretty standard. It includes proxy_ajp.conf > which has: >=20 > LoadModule proxy_ajp_module modules/mod_proxy_ajp.so > ProxyPass /tomcat/ ajp://localhost:8009/ I only have some experience with Tomcat-6, not Tomcat-5.5, so maybe there are some mistakes in my posting, but AFAIK: - A corresponding ProxyPassReverse is missing.=20 - If you want to redirect requests to http://hostname.domain.tld/ to ROOT then you should simply write "/" and not "/tomcat/". Maybe a chip of our mixed IP- and name-based Apache-vhost-configs gives you an idea of how to setup Apache2 (in this environment hostnames with TLD "prod" are private IP-adresses for internal access).=20 The setup uses a mix of mod_proxy_http and mod_proxy_ajp. Of course you have to configure tomcat's server.xml to offer ajp-access via Port 8009. Usually mod_proxy_ajp works better (handling of out-buffer, cache ontrol) but in rare cases we had problems with mod_proxy_ajp. Of course httpd.conf of our apache2.2 has got an include-statement for /srv/conf.d/*.conf in order to use this config. ---------------------------snip--------------------------- [crm@mikesch ~]$ cat /srv/conf.d/crm.conf # # vhost-configuration *.crm.company.* # # Virtual IP-Alias via DNS NameVirtualHost crm.company.prod:80 # =20 # vhost for production # DocumentRoot /srv/crm/html ServerName crm.company.de ServerAlias crm.company.prod ErrorLog /srv/crm/logs/error_log TransferLog /srv/crm/logs/access_log # Reverse-Proxy for ajp-connector ProxyRequests Off Order deny,allow Allow from all # avoid public access to mgmt-applications ProxyPass /docs ! ProxyPass /probe ! ProxyPass /manager ! # connecting tomcats ROOT via mod_proxy_http and coyote ProxyPass / http://crm.company.prod:8080/ ProxyPassReverse / http://crm.company.prod:8080/ # alternative: connecting tomcats ROOT via ajp # ProxyPass / ajp://crm.company.prod:8009/ = =20 # ProxyPassReverse / ajp://crm.company.prod:8009/ # # allow vhost for management only for users in private network # = =20 DocumentRoot /srv/crm/html/mgmt ServerName mgmt.crm.cataneo.prod ErrorLog /srv/crm/logs/error_log TransferLog /srv/crm/logs/access_log # Displaying Apache vhost-statistics under /usage Alias /usage /srv/crm/html/mgmt/usage Order deny,allow Deny from all Allow from 127.0.0.1 Allow from ::1 Allow from company.prod # Reverse-Proxy fuer ajp-connector ProxyRequests Off Order deny,allow Deny from all Allow from 127.0.0.1 Allow from ::1 Allow from company.prod ProxyPass /probe ajp://crm.cataneo.prod:8009/probe ProxyPassReverse /probe ajp://crm.cataneo.prod:8009/probe ProxyPass /manager ajp://crm.cataneo.prod:8009/manager ProxyPassReverse /manager ajp://crm.cataneo.prod:8009/manager ProxyPass /docs ajp://crm.cataneo.prod:8009/docs ProxyPassReverse /docs ajp://crm.cataneo.prod:8009/docs ---------------------------snip--------------------------- RU, Tobias. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org