I have..
<VirtualHost *:80>
ServerName my.server.name
RewriteEngine On
RewriteRule ^(.*)$ https://my.server.name$1 [R,L]
</VirtualHost>
in my port 80 default virtual host and it works fine.
On 06/09/11 15:39, Graham Dumpleton wrote:
On 6 September 2011 07:18, Josh Stratton<[email protected]> wrote:
My employer recently setup an SSL certificate for a domain I just
setup using mod_wsgi, apache, and django. I've tried putting a
redirect in the wsgi.conf file to setup a redirect to https, but
doesn't seem to be working...
WSGIDaemonProcess test processes=1 threads=1
python-path=/home/net/public_html/:/home/net/public_html/managio
WSGIProcessGroup test
WSGIScriptAlias / /home/net/public_html/managio.wsgi
<Directory "/home/stratton/public_html">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
RedirectMatch http://(.*) https://$1
The string matched against the pattern will not include 'http://host".
That is why it isn't going to match.
Googling yields various approaches to this. First is to add in to port
80 VirtualHost:
Redirect permanent / https://mail.nixcraft.com/
where target host would be changed to yours.
Another is to use:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Graham
I'm new to SSL and I don't know if I'm missing a bigger issue, but
basically everything needs to redirect to SSL-enabled connection,
which I assume apache recognizes when the URL is prefixed with https.
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.