Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-16-2012, 01:26 AM   #1
john lee
Registered: Jun 2001
Location: Sydney, Australia
Posts: 42

Rep: Reputation: 15
Apache 2.x: http for some paths and https for other paths

I am wondering if this can really be done in Apache.

I have installed several web applications on one single 2.x Apache server on Centos 6. I have installed SSL in Apache as well.

I would like to achieve the following:
For App A: user must access using
For App B: user must access using

Any thoughts?
Old 07-16-2012, 02:27 AM   #2
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Make everything go through SSL (https). I don't really see a reason why you want to use the mix of http/https for the setup you describe.
Old 07-17-2012, 01:33 AM   #3
john lee
Registered: Jun 2001
Location: Sydney, Australia
Posts: 42

Original Poster
Rep: Reputation: 15
<VirtualHost _default_:80>
RewriteEngine on
RewriteRule ^/secure/(.*)$ https://%{SERVER_NAME}/secure/$1 [R=301,L]

<VirtualHost _default_:443>
RewriteEngine on
RewriteRule ^/public/(.*)$ http://%{SERVER_NAME}/public/$1 [R=301,L]


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
how to change Apache page from http to https technodweeb Linux - Server 9 03-08-2013 12:42 PM
Apache - I want a timeout for invalid paths Apollo77 Linux - Server 3 11-15-2007 08:48 AM
Apache 2: forward http to https? OneSeventeen Linux - Software 2 07-03-2006 07:10 AM
PHP include() file paths in Apache virtual hosts tawalker Linux - Software 0 09-23-2004 02:16 PM
Automatically resolving WINDOWS paths to pre-configured Linux paths gazzy Linux - General 1 09-05-2003 10:15 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:24 AM.

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