LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-06-2009, 07:15 PM   #1
pkraus109
LQ Newbie
 
Registered: Mar 2004
Posts: 23

Rep: Reputation: 16
Unhappy Apache 2 -> Turbogears 2.0 wsgi -> SSL


I have a web application I am going to be deploying soon. I am pretty new when it comes to apache and I am getting twisted around the axel on the configuration. I have it so that I am able to access my application both in ssl and normal (http, https). The problem is I want to force ssl for some pages and force non ssl on other portions of the site.

I figured the best way to do this would be through rewrite. I can get it to work in one direction. For intstance i can get the redirects to https to work but once on https the redirect back doesn't.

Apache 2 Config File ...
# redirect non-secure pages (/user, /register or /action) to https if requested by HTTP
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
</VirtualHost>

Alias /images /webapp/images
Alias /css /webapp/css
Alias /javascript /webapp/javascript

WSGIScriptAlias / /webapp/apache/config.wsgi
WSGIDaemonProcess webapp threads=10 processes=3
WSGIProcessGroup webapp

<Directory /webapp/apache>
Order deny,allow
Allow from all
</Directory>
 
  


Reply

Tags
apache2


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
SSL Servers vs Apache SSL mlewis Linux - Networking 2 04-02-2008 10:13 AM
we're seeking someone who has skills on sqlalchemy and turbogears JaDa General 0 09-21-2006 01:49 PM
LXer: The web development megaframework TurboGears LXer Syndicated Linux News 0 08-19-2006 09:54 PM
LXer: Develop for the Web with TurboGears and Python LXer Syndicated Linux News 0 07-13-2006 04:54 PM
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


All times are GMT -5. The time now is 12:20 PM.

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