> --
>
> You received this message because you are subscribed to the Google Groups
> "cherrypy-users" group.
> To post to this group, send email to cherryp...@googlegroups.com.
> To unsubscribe from this group, send email to
> cherrypy-user...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/cherrypy-users?hl=en.
>
On Dec 18, 7:09 pm, John Riddle <jbrav...@gmail.com> wrote:
> Hey folks, I've been running a cherrypy app on a WAMP box for awhile now and
> am now setting up a LAMP. I'm having much more difficulty than I ever did
> with the windows side of things surprisingly... I've got a strong feeling I
> have flicked on one "switch" somewhere and was hoping you guys could point
> it out. I've checked every log I can think of and not one of them is showing
> any sort of error but when I browse to my site the browser just hangs. I'm
> also serving phpmyadmin and that works great. My wild guess is that the
> mod_python isn't accessing the cherrypy.setup module, judging by the hang.
> Also when this file (called root.py) is accessed python usually creates it's
> compiled version (.pyc) and don't see it for root.py. Any help you can give
> a struggling noob is appreciated!
>
> my sites-enabled file:
>
> <VirtualHost *:80>
> ServerAdmin jrid...@shadevfx.com
> ServerName umbra
> DocumentRoot /var/www/umbra/htdocs
>
> PythonPath "sys.path+['/var/www/umbra/htdocs']"
> SetHandler python-program
> PythonHandler cherrypy._cpmodpy::handler
> PythonOption cherrypy.setup root::serverless
> PythonDebug On
>
> ErrorLog /var/www/umbra/logs/log.log
> CustomLog /var/log/apache2/access.log combined
> </VirtualHost>
>
> And the lines in root::serverless that start us up
> cherrypy.config.update({'environment': 'production',
> #'log.screen': False,
> 'log.screen': True,
> 'log.error_file':
> '/var/www/umbra/logs/site.log',
> 'show_tracebacks': True,})
> #'show_tracebacks': True,})
> cherrypy.engine.SIGHUP = None
> cherrypy.engine.SIGTERM = None
> cherrypy.tree.mount(Root())
> cherrypy.engine.start()
Well that looks exactly the same as the config and code that works for
me.
This should be a silly question, but you have loaded mod_python?
Something like
LoadModule python_module lib/httpd/mod_python.so
in httpd.conf.
Other than that, look in the error log as already suggested.
As an aside you shouldn't be putting any code in htdocs - it should be
outside the apache documents path - something like cgi-bin.
And as has already been said mod_wsgi offers many benefits, not least
that properly configured other users in a virtula hosting environment
can't see your code.
Pete
> > cherrypy-user...@googlegroups.com<cherrypy-users%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/cherrypy-users?hl=en.
Sounds like Apache can't get to your htdocs and is falling back to the
server root at /var/www
Does the user Apache as running as have list access to /var/www/umbra/
htdocs and all the directories on the way from / ? Apache will try to
stat each segment of the path.
Does the user Apache is running as have read access to your program
files in htdocs?
Have you got a section thus:
<Directory "/var/www/umbra/htdocs">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
This can go in the virtual host section.
Pete
--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To post to this group, send email to cherryp...@googlegroups.com.
To unsubscribe from this group, send email to cherrypy-user...@googlegroups.com.
cheers
Paul
>> cherrypy-user...@googlegroups.com<cherrypy-users%2Bunsu...@googlegroups.com>