[mod_python] fedora vs ubuntu

Graham Dumpleton grahamd at dscpl.com.au
Wed Oct 4 18:09:11 EDT 2006


marinus van aswegen wrote ..
> Hi All
> 
> Let me pull this thread together. I had a working Apache2/mod_python setup
> on Ubuntu.
> Mod_python was setup so that I could call my python ap url/app/func
> all worked fine until i moved my app to fedora. i just got the app
> working again but apache wont serve any other files like images now.
> will hit the faq when i get home later.

And it is because you are using the SetHandler directive. By using that
directive, all requests will be intercepted and sent through to mod_python.

Read:

  http://www.dscpl.com.au/wiki/ModPython/Articles/SetHandlerVersusAddHandler

It explains the difference between SetHandler and AddHandler.

You may just want to use:

  AddHandler mod_python .py

instead of SetHandler, but generally this means you need to use .py in
your URLs for Python stuff.

Graham

> <SNIP>
> 
> 
> LoadModule python_module modules/mod_python.so
> 
> NameVirtualHost *:80
> 
> 
> <VirtualHost *:80>
>     DocumentRoot "/opt/www"
>     ServerName www.test.co.za
>     DirectoryIndex index.html
> 
> </VirtualHost>
> 
> 
> # Virtual host Virtual Host 0
> <VirtualHost *:443>
>      DocumentRoot "/opt/www"
>      ServerName www.test.co.za
> 
>     DirectoryIndex index.html
> 
>      SSLEngine on
>      SSLCertificateFile /keys/server.crt
>      SSLCertificateKeyFile /keys/server.key
> 
> </VirtualHost>
> 
> 
> 
> <VirtualHost *:80>
>     DocumentRoot "/opt/www.telic.co.za"
>     ServerName www.telic.co.za
> </VirtualHost>
> 
> 
> <Directory "/">
>         Options FollowSymLinks
>         AllowOverride None
> </Directory>
> 
> <Directory "/opt/www">
>      # extend the pathon path so our python modules can be loaded
>     PythonPath "['/opt/www'] + sys.path"
> 
>     # set the handler to mod_python + publisher so we can call url/python
>     SetHandler mod_python
> 
>     PythonHandler mod_python.publisher
> 
>     PythonDebug On
> 
>     # do not permit access to compiled python code
>         <Files *.pyc>
>             deny from all
>         </Files>
> 
> 
> </Directory>
> 
> 
> 
> 
> 
> 
> On 10/3/06, Eric Brunson <brunson at brunson.com> wrote:
> >
> > Colin Bean wrote:
> > > Thanks for the correction, Eric; I've never actually done that and
> > > assumed incorrectly.  Shame on me for recommending something that I
> > > haven't tried!
> >
> > No worries, we're all here to learn.  :-)
> >
> > >
> > > Marinus, what I should have asked originally was how apache was
> > > failing with your config files (and what's in the error log).  What
> > > does your "limited success" mean?
> > >
> > > -Colin
> >
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> >
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python


More information about the Mod_python mailing list