LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-03-2004, 11:31 AM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
Configuring Automatic SSL Redirect for Apache 2.0.50


Hi there --

I am in the process of setting up an automatic redirect to a secure port. The route that I am taking is configuring the httpd.conf file with a VirtualHost. The syntax that I have entered is the following:

<VirtualHost 192.168.1.100:80>
ServerName example.com
ServerAdmin webma ster@example.com
DocumentRoot /www
Redirect / https://example.com/
</VirtualHost>


<VirtualHost 192.168.1.100:443>
ServerName example.com
ServerAdmin webmaster@example.com
DocumentRoot /www

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>

The error message that I am encountering is the following:

Syntax error on line 1137 of ..httpd.conf: Invalid command 'SSLEngine' perhaps it is misspelled or defined by a module not included in the server configuration.

I have installed ssl onto the server and there is a LoadModule ssl_module modules/mod_ssl.so line as well as an IfModule section that reads Include conf/ssl.conf.

I have not made any changes to the ssl.conf file.
What do I need to do to be able to have the automatic redirect work? Thanks.
 
Old 08-23-2005, 05:26 AM   #2
Wimpie22
Member
 
Registered: May 2003
Posts: 85

Rep: Reputation: 15
Hey,

Put your config between these lines.


<IfDefine SSL>

<VirtualHost 192.168.1.100:80>
ServerName example.com
ServerAdmin webma ster@example.com
DocumentRoot /www
Redirect / https://example.com/
</VirtualHost>

<VirtualHost 192.168.1.100:443>
ServerName example.com
ServerAdmin webmaster@example.com
DocumentRoot /www

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>

</IfDefine SSL>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 04:11 PM
Debian redirect apache to apche-ssl klyshi Linux - Software 1 10-04-2005 10:27 AM
redirect in Apache baslemmens Linux - Networking 6 09-02-2004 12:07 PM
2 servers with automatic redirect links xektop Linux - General 2 07-24-2004 12:26 PM
automatic ip configuring atheist Linux - Networking 4 01-25-2004 08:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration