LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-29-2008, 05:59 AM   #1
n03x3c
Member
 
Registered: Aug 2008
Location: India
Distribution: Fedora, RedHat
Posts: 101

Rep: Reputation: 17
How to make SSL default in Apache?


Hello People,

I have setup Apache 2.2 server with mod_ssl and it is working perfect. Both ssl.conf and httpd.conf are configured with same working virtual host and I can open http://localhost and https://localhost without any problem

What I need to do is that I want to make all users to use HTTPS, and I want to make SSL default. How can I do that?
 
Old 09-29-2008, 09:04 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,732

Rep: Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584Reputation: 1584
You can use mod_rewrite to redirect all requests from http to https:
Code:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
More examples you can find here.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 2.2.8+ssl issues after make kulg123 Linux - Software 9 06-16-2014 10:14 AM
apache 2.2.8+ssl Issues After Make kulg123 Linux - General 1 07-01-2008 01:33 AM
apache+ssl issues after make kulg123 Linux - Software 1 07-01-2008 01:33 AM
Make Apache cgi-bin SSL Only? TruckStuff Linux - Security 3 05-09-2005 10:37 AM
Apache Make Errors With SSL SForsgren Linux - Software 2 10-16-2003 04:34 PM


All times are GMT -5. The time now is 10:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration