Finally I figured it out! I had to read about VirtualHost and
NameVirtualHost in the Apache manual, which I was trying to avoid. :)
Here's my final configuration. I have used both RewriteMatch and
mod_rewrite (just to to remind myself it can also be done both ways).
For now, I have chosen not to worry about serving static content
through Apache.
Thanks for all the help Francis! :)
Regards,
Shashi
/*httpd.conf (only relevant portion) */
Listen 80
Listen 443
LoadModule ssl_module modules/mod_ssl.so
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
JkMount /* ajp13
RewriteEngine on
Options +FollowSymlinks
RewriteCond %{http_host} ^xyz.com [nc]
RewriteRule ^(.*)$ http://www.xyz.com$1 [r=301,nc,L]
RewriteCond %{http_host} ^abc.com [nc]
RewriteRule ^(.*)$ http://www.abc.com$1 [r=301,nc,L]
</VirtualHost>
<VirtualHost *:80>
JkMount /* ajp13
ServerName www.xyz.com
RedirectMatch permanent ./*specsheets.html$
http://www.xyz.com/specsheets.jsp
RedirectMatch permanent ./*locations.html$
http://www.xyz.com/contactus.jsp
RedirectMatch permanent ./*mission.html$ http://www.xyz.com/aboutus.jsp
</VirtualHost>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
SSLMutex default
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
<VirtualHost *:443>
ServerName *.xyz.com
JkMount /* ajp13
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
SSLCertificateFile /etc/httpd/conf/ssl.crt/_.xyz.com.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/xyz.key
SSLCertificateChainFile
/etc/httpd/conf/ssl.crt/gd_intermediate_bundle.crt
</VirtualHost>
On Sun, Apr 13, 2008 at 11:38 AM, Francis Galiegue <[EMAIL PROTECTED]> wrote:
> 2008/4/13, Shashidhar Rampally <[EMAIL PROTECTED]>:
> [...]
>
> > Also when I tried to replace one VirtualHost with multiple
> > VirtualHosts (and hence not needing mod_rewrite), I am getting the
> > following error message:
> > [warn] VirtualHost xyz.com:80 overlaps with VirtualHost
> > www.xyz.com:80, the first has precedence, perhaps you need a
> > NameVirtualHost directive
> >
>
> Have you put a NameVirtualHost your.ip.add.ress:{443,80} before
> defining your virtual hosts?
>
> --
>
>
> Francis Galiegue, [EMAIL PROTECTED]
> "When it comes to performance, weight is everything" - Tiff Needell
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: [email protected]
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]