Hi there --
I am trying to automatically redirect connections from port 80 to port 443. I set up a virtual host section to accomplish this task. Here is the syntax
that I entered into the httpd.conf file:
<VirtualHost 192.168.112.62>
ServerName 192.168.112.62
ServerAdmin
someone@someplace.com
DocumentRoot /usr/local/apache/htdocs
Redirect /
https://192.168.112.62/
</VirtualHost>
<VirtualHost 192.168.112.62>
ServerName 192.168.112.62
ServerAdmin
someone@someplace.com
DocumentRoot /usr/local/apache/htdocs
SSLEngine On
SSLCertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
SSLCertificateChainFile /usr/local/apache/conf/ssl.key/server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
</VirtualHost>
When I start Apache with SSL, apachectl startssl, I get the following error message:
Thu Sep 9 15:44:57 2004] [warn] VirtualHost 192.168.112.62:80 overlaps with VirtualHost 192.168.112.62:80, the first has precedence, perhaps you need a NameVirtualHost directive
Apache/1.3.31 mod_ssl/2.8.19 (Pass Phrase Dialog)
Some of your private key files are encrypted for security reasons.
In order to read them you have to provide us with the pass phrases.
Server linux.mgh.harvard.edu:443 (RSA)
Enter pass phrase:
Ok: Pass Phrase Dialog successful.
/usr/local/apache/bin/apachectl startssl: httpd started
linux:/usr/local/apache/conf # ps -ef |grep httpd
root 10767 9807 0 15:45 pts/54 00:00:00 grep httpd
As you can see, I enter the appropriate passphrase and although it appears the httpd daemon has started, the grep command shows it has not.
If I comment out the VirtualHost excerpt shown above, Apache starts successfully.
What do I need to correct?