[TriLUG] Apache + SSL +Virtual Hosts + Reverse Proxy
Michael Hrivnak
mhrivnak at triad.rr.com
Mon Oct 25 03:42:40 EDT 2004
The subject may have given away the problem. Here's what I want to
accomplish:
Mandrake 10.0 Official web server, Apache 2.
1. I want my standard website to be accessible through both http://domain.com
and https://domain.com.
2. I want https://tivo.domain.com to act as a secure reverse proxy to my
Series 2 tivo, which I've obviously hacked.
3. I want https://ntop.domain.com to act as a secure reverse proxy to ntop's
web server, which is running on the same machine as apache.
Now that my wish list is out, here's what I did. Prior to attempting to
achieve the second and third objectives, the first was working perfectly. I
then made entries like this in my apache config:
<VirtualHost *>
ServerName ntop.domain.com
ProxyRequests On
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
<Location />
AllowOverride AuthConfig
Options FollowSymlinks
Order allow,deny
Allow from all
AuthName "Restricted Access"
AuthType Basic
AuthUserFile "/path/to/file"
<Limit GET>
require valid-user
</Limit>
</Location>
</VirtualHost>
I also took all of the existing <Directory> directives for my primary website
and put the whole thing in a <VitrualHost *> directive.
As it stands, objectives 2 and 3 work, but I broke objective 2.
https://domain.com works fine. http://domain.com gives this result:
-------------
Bad Request
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
Hint: https://domain.com/
-------------
So, any thoughts? I'm reading some things online that say it's not possible
to do SSL and virtual hosts, but I'm so close.
Thanks a ton,
Michael
More information about the TriLUG
mailing list