Operating System - Linux
1753500 Members
4648 Online
108794 Solutions
New Discussion юеВ

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:


ServerName 192.168.112.62
ServerAdmin someone@someplace.com
DocumentRoot /usr/local/apache/htdocs
Redirect / https://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


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?
A Journey In The Quest Of Knowledge
2 REPLIES 2
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

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
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