mod_python + ssl ???

mod_python + ssl ???

am 02.04.2008 02:06:23 von wswilson

I'm very new to ssl and apache config so this may be obvious. I'm
running on apache2 on mac os x leopard. All urls except /static are
handled by python. However, when I set "SSLEngine On", none of my urls
respond. They all come back "Failed to open page" in my browser. What
am I doing wrong? Thanks.


---------httpd.conf----------

ServerRoot "/usr"
Listen 80
Listen 443

LoadModule python_module libexec/apache2/mod_python.so
LoadModule mime_module libexec/apache2/mod_mime.so
LoadModule ssl_module libexec/apache2/mod_ssl.so

User www
Group www

DocumentRoot "/code/public"

ServerName www.domain.com #actually my domain

ErrorLog /private/var/log/apache2/error_log

LogLevel warn


LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-
Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common


LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-
Agent}i\" %I %O" combinedio


CustomLog /private/var/log/apache2/access_log common


DefaultType text/plain


TypesConfig /private/etc/apache2/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl



SSLEngine On

SSLCertificateFile "/certs/www.domain.com.crt"
SSLCertificateKeyFile "/certs/www.domain.com.key"
SSLCertificateChainFile "/certs/gd_intermediate_bundle.crt"



SetHandler mod_python
PythonHandler lib.app
PythonDebug On
PythonPath "['/code/'] + sys.path"



SetHandler mod_python
PythonHandler lib.admin
PythonDebug On
PythonPath "['/code/'] + sys.path"



SetHandler none

Re: mod_python + ssl ???

am 03.04.2008 21:14:47 von wswilson

On Apr 1, 8:06=A0pm, wswilson wrote:
> I'm very new to ssl and apache config so this may be obvious. I'm
> running on apache2 on mac os x leopard. All urls except /static are
> handled by python. However, when I set "SSLEngine On", none of my urls
> respond. They all come back "Failed to open page" in my browser. What
> am I doing wrong? Thanks.
>
> ---------httpd.conf----------
>
> ServerRoot "/usr"
> Listen 80
> Listen 443
>
> LoadModule python_module libexec/apache2/mod_python.so
> LoadModule mime_module libexec/apache2/mod_mime.so
> LoadModule ssl_module libexec/apache2/mod_ssl.so
>
> User www
> Group www
>
> DocumentRoot "/code/public"
>
> ServerNamewww.domain.com#actually my domain
>
> ErrorLog /private/var/log/apache2/error_log
>
> LogLevel warn
>
>
> =A0 =A0 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-
> Agent}i\"" combined
> =A0 =A0 LogFormat "%h %l %u %t \"%r\" %>s %b" common
>
> =A0 =A0
> =A0 =A0 =A0 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-=

> Agent}i\" %I %O" combinedio
> =A0 =A0

>
> =A0 =A0 CustomLog /private/var/log/apache2/access_log common
>

>
> DefaultType text/plain
>
>
> =A0 =A0 TypesConfig /private/etc/apache2/mime.types
> =A0 =A0 AddType application/x-compress .Z
> =A0 =A0 AddType application/x-gzip .gz .tgz
>
> =A0 =A0 =A0 =A0 AddType application/x-x509-ca-cert .crt
> =A0 =A0 =A0 =A0 AddType application/x-pkcs7-crl =A0 =A0.crl
>

>
>
> =A0 =A0 =A0 =A0 SSLEngine On
>
> =A0 =A0 =A0 =A0 SSLCertificateFile "/certs/www.domain.com.crt"
> =A0 =A0 =A0 =A0 SSLCertificateKeyFile "/certs/www.domain.com.key"
> =A0 =A0 =A0 =A0 SSLCertificateChainFile "/certs/gd_intermediate_bundle.crt=
"
>

>
>
> =A0 =A0 =A0 =A0 SetHandler mod_python
> =A0 =A0 =A0 =A0 PythonHandler lib.app
> =A0 =A0 =A0 =A0 PythonDebug On
> =A0 =A0 =A0 =A0 PythonPath "['/code/'] + sys.path"
>

>
>
> =A0 =A0 =A0 =A0 SetHandler mod_python
> =A0 =A0 =A0 =A0 PythonHandler lib.admin
> =A0 =A0 =A0 =A0 PythonDebug On
> =A0 =A0 =A0 =A0 PythonPath "['/code/'] + sys.path"
>

>
>
> =A0 =A0 =A0 =A0 SetHandler none
>


Forgot to mention: The same configuration works in debian etch and
then fails when I turn on SSLEngine.