tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Bailey" <>
Subject RE: AJP Connector - Problems Proxying HTTPS Connections
Date Mon, 05 Feb 2007 16:47:35 GMT
Thanks for your suggestions. However, I still have the same problem.

I removed the NameVirtualHost entry for port 443, removed the port from
the ServerName, removed the DocumentRoot and ServerAlias completely, and
added the / to both the ProxyPass and ProxyPassReverse entries after
removing the Location element (I should mention that I had tried that
previously and then changed to the single argument version inside a
Location / element as an experiment which, by the way, works fine as
long as the connection is via port 80). In fact, several of the things I
changed this time around were introduced by my desperation to find some
combination that works.

I still get the same problem. If I connect to https: I am immediately
redirected to the http: version of the URL. If the port 80 virtual host
is set up under Apache HTTPD it processes it and if not, I get an error
saying Apache could not find whatever file I'm trying to access.

I also want to emphasize that the connection to Apache via SSL is
working fine. I see the entries in the log files indicating Apache got
the request. I can even see in the Tomcat logs where Apache forwarded
the request on the port specified in the ProxyPass directives. But ... I
can also see an entry in the Tomcat log where it appears to send a
redirect using http: as the scheme. Thus, my conclusion that it is my
Tomcat configuration rather than my Apache HTTPD configuration that is
the cause of the problem.

I have pasted the latest fragments of the Apache HTTPD configuration
files below in case I've still missed the point of one or more of your

The only change to the Tomcat configuration is the addition of a
separate AJP connector specifically for the unsecured connection.

Thanks for any additional ideas or input.

Apache HTTPD Configuration Fragments

## SSL Virtual Host Context

	# General setup for the virtual host

    	ErrorLog logs/resourcepoint-ssl-error_log
    	CustomLog logs/resourcepoint-ssl-access_log common

    	<Directory "E:/Apache2/vhosts/resourcepoint">

		... directory stuff here ...


    	ProxyPass / ajp://
    	ProxyPassReverse / ajp://

	... SSL stuff here ...


Just in case it helps, here is the port 80 virtual host configuration
which works just fine.

# Use name-based virtual hosting.

# VirtualHost

    DocumentRoot E:\Apache2\vhosts\resourcepoint
    ErrorLog logs/resourcepoint-error_log
    CustomLog logs/resourcepoint-access_log common

    <Directory "E:/Apache2/vhosts/resourcepoint">
	... directory stuff here ...


    # Note that this approach with single argument
    # nested in a Location element works just fine
    # for the non-SSL, port 80 virtual host.

    <Location / >

   	ProxyPass ajp://
    	ProxyPassReverse ajp://



Tomcat Configuration (Server.xml)

  <Service name="Catalina">

    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->

    <Connector port="8888"
               minSpareThreads="25" maxSpareThreads="75"
               disableUploadTimeout="true" />

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" 
		   proxyPort="443" />

    <Connector port="8010" 
		   proxyPort="80" />

    <!-- Define the top level container in our container hierarchy -->

    <Engine name="Catalina" defaultHost="">

      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase" />

      <Host name="localhost" appBase="webapps" />

      <Host name="" 

		<Context path="" docBase="ROOT" debug="1"/>



-----Original Message-----
From: Hassan Schroeder [] 
Sent: Monday, February 05, 2007 11:11 AM
To: Tomcat Users List
Subject: Re: AJP Connector - Problems Proxying HTTPS Connections

On 2/5/07, Bill Bailey <> wrote:

To start with --

> Apache Virtual Host Configuration Fragment

> NameVirtualHost xxx.xx.xx.x:443

NameVirtualHosting and SSL don't go together -- yank that

> <VirtualHost xxx.xx.xx.x:443>

Put the real IP that belongs to the SSL cert there

>       ServerName
>       DocumentRoot E:\Apache2\vhosts\resourcepoint
>       ServerAlias

The server name and alias should not have the port # appended
In the example, the name and alias are the same, which makes no
sense. And if you're proxying everything, you don't need to specify
a DocumentRoot. However,

>             ProxyPass ajp://
>             ProxyPassReverse ajp://

that's wrong -- those two directives take two arguments, e.g

   ProxyPass / ajp://

Fix those, and make sure your config files at least passes the config
test ( $APACHE_HOME/bin/apachectl -t )

Hassan Schroeder ------------------------

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message