LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-06-2008, 04:13 PM   #1
Carl Filby
Member
 
Registered: Aug 2008
Location: Deep East Texas
Distribution: Debian,Ubuntu
Posts: 36

Rep: Reputation: 15
Question SSL setup for one page using apache2


I need to setup SSL for this one page only

http://192.168.111.208/cgi-bin/caweb...viour=purchase

but not the whole site. How do I do it?
 
Old 10-06-2008, 05:42 PM   #2
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Set up SSL on your webserver with the same cgi-bin path as used for your normal setup, and then update all the links to that page to begin with https. Though, if you're doing shopping-type transactions, make sure all the pages involved in the entire transaction are secured via SSL.
 
Old 10-07-2008, 08:09 AM   #3
Carl Filby
Member
 
Registered: Aug 2008
Location: Deep East Texas
Distribution: Debian,Ubuntu
Posts: 36

Original Poster
Rep: Reputation: 15
The problem is that if I setup SSL in order to use HTTPS the whole site is using HTTPS. That is not what I need. I need advice how to setup SSL so as to use SSL ONLY when needed.

Example goto southwestairlines.com and book a flight. Until you get to purchase screen you are on http. That is what I need http until get to purchase then use HTTPS.

I need to have an HTTPS and HTTP mixed environment.Where HTTPS is used when called.

Also I used this rewrite to go from http to https when needed:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^reservations.plx(.*) https://%{SERVER_NAME}/cgi-bin/cawebsite/reservations.plx$1 [R,L]

Above rewrite is located in my /etc/apache2.conf
I used: (self-signed cert temporary), after enabling SSL mod using a2enmod ssl
SSLEngine on
SSLCertificateFile /etc/apache2/server.crt
SSLCertificateKeyFile /etc/apache2/server.key
But that is global(used in apache2.conf as while)

Last edited by Carl Filby; 10-07-2008 at 08:10 AM.
 
Old 10-07-2008, 08:54 AM   #4
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
You'd also need to make sure the links within those pages point to https and not http, or else sensitive data may be exposed prior to the redirect.
 
Old 10-07-2008, 08:56 AM   #5
Carl Filby
Member
 
Registered: Aug 2008
Location: Deep East Texas
Distribution: Debian,Ubuntu
Posts: 36

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Matir View Post
You'd also need to make sure the links within those pages point to https and not http, or else sensitive data may be exposed prior to the redirect.
HTTPS does NOT work if not enabled. I need to know how to enable as need and NOT globally.
 
  


Reply

Tags
apache2, ssl


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
Document for setup Apache2 with SSL/TLS satimis Linux - Server 2 11-24-2006 07:46 PM
Apache2 and SSL problem shrimpwagon Linux - Software 0 11-10-2006 10:32 AM
Apache2 + ssl blunt Slackware 4 10-31-2006 07:23 AM
creating an SSL page under non SSL site with apache1.33? taiwf Linux - Software 1 06-27-2006 01:06 AM
apache2 - ssl : connection via ssl interrupted ldp Linux - Software 0 10-02-2005 09:07 AM


All times are GMT -5. The time now is 05:25 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration