[mod_python] mod_python + mod_ssl

Brian Ray bray at sent.com
Thu Sep 23 10:34:40 EDT 2004



On Sep 22, 2004, at 6:47 PM, Byron Ellacott wrote:

> Brian Ray wrote:
>> I am running mod_ssl and mod_python on separate Virtual Hosts. I 
>> would like to run them in the same location. Will this work?
>
> I don't think I understand what you're asking here.  What do you mean 
> by "in the same location?"  If you mean the same physical filespace, 
> you can probably do that by having each virtual host config include a 
> shared config for the mod_python section.

I want make sure that mod_python and ssl will run together.

In a testing environment, I really do not need ssl so I have added to 
my httpd.conf:

<Directory  /var/www>
    SetHandler python-program
    PythonHandler index
    PythonDebug On
    PythonAutoReload On
</Directory>

Works fine. All page requests are handled by the index.py in the 
directory.

I am trying to put together some instructions for the person who is 
administering a server in the live environment--where what I am working 
on will eventually end up.  I am sure I am not the only who want's to 
use ssl and mod_python.

>
> If you're using named virtual hosts, note that there is a bug in 
> mod_ssl for Apache 2.0 that can prevent POSTs from working, depending 
> on how you configure your SSL options.  It can also affect numeric 
> virtual hosts and single host setups where you alter client verify 
> requirements on a per-directory or per-location basis.
>

Oh no. I hope we can find a work-around for this bug.

In the live environment, they are actually using Webmin (1.114) to 
administer the Virtual Severs. Mod_python is not in the list of Apache 
modules supported by Webmin :( So, here I may have to do some 
hand-holding if I want to use mod_python. And I do not know mod_python 
or webmin very well yet.

On the general Edit Config File (httpd.conf) this will need to be added 
(of course after the module has been compiled):

	LoadModule python_module modules/mod_python.so

There is a place to create a New Virtual Server. The entry will 
indicate Any address to Port 443 and all the SSL certs will be 
indicated as a normal ssl installation.  There is a place to add/edit 
apache directives on a per directory basis. Here, I plan on having this 
added:

   SetHandler python-program
   PythonHandler index
   PythonDebug On
   PythonAutoReload On

Will this work? Will the index.py be able to retrieve GET and POST form 
variables  (including files) the same way as if not using SSL in this 
configuration. I would try asking webmin about this issue, however I 
fear hearing that mod_python in not a supported module.

Thanks in advance.





More information about the Mod_python mailing list