Apache redirect SSL on Centos 5.2

I have a webserver "web01" hosting multiple domains on 1 IP. I have a virtual hosting setup.

One of the virtual hosts listens on port 443 and others on port 80.
       ServerName www.techdomain.com
   ........etc etc

I want to redirect port 443 for server https://mail.domain.com to another server on IP The server at is configured properly to listen for port 443 webmail.

I create a Virtual host.

   ServerName mail.domain.com
   RewriteLog "/var/log/httpd/mail.domain.com.rewrite.log"
   RewriteLogLevel 9
   RewriteEngine     On
   RewriteRule       ^(.*)$        https://mail.domain.com$1  [P]
   ServerAlias mail.domain.com

Then I change the hosts file to point mail.domain.com to

My problem is, if I redirect on port 80 to port 80, It works fine but when I redirect on 443 to 443, it breaks www.techdomain.com and the redirect for mail.domain.com does not work either.

Any advice?
Who is Participating?
ralphcarter2008Author Commented:
Any config you can lend?
I would suggest installing mod_proxy in apache and using it to reverse proxy techdomain.com/webmail to your back side server this will retain your techdomain.com config.  Also this will allow you toshare a cert between the two systems as you will actually be hitting the main ssl port.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.