Showing results for 
Search instead for 
Did you mean: 

Problem Redirecting in Apache

Andrew Kaplan
Super Advisor

Problem Redirecting in Apache

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:

DocumentRoot /usr/local/apache/htdocs
Redirect /

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

When I start Apache with SSL, apachectl startssl, I get the following error message:

Thu Sep 9 15:44:57 2004] [warn] VirtualHost overlaps with VirtualHost, 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 (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?
A Journey In The Quest Of Knowledge
Steven E. Protter
Exalted Contributor

Re: Problem Redirecting in Apache

Please look at the error_log file and post up an error.

The daemon is failing on a confguration error, more than likely.

httpd -t will test the syntax of httpd.conf

Steven E Protter
Owner of ISN Corporation
Andrew Kaplan
Super Advisor

Re: Problem Redirecting in Apache

I found the problem: The second heading should have read:
A Journey In The Quest Of Knowledge