thanks for your help graham

do you think updating will fix anything

do you or anyone have any extra advice

i am flying blind

thanks again

zeven



On Aug 23, 9:05 pm, Graham Dumpleton <[email protected]>
wrote:
> On 24 August 2010 10:34, zevenwolf <[email protected]> wrote:
>
>
>
>
>
>
>
> > I am following this configuration guide
> >  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
>
> > I ran httpd -M and indeed it says wsgi_module(shared)
>
> > I changed the my apache host settings to look like this:
>
> > <VirtualHost *:80>
> >    DocumentRoot /var/www/vhosts/zevenwolf.com/httpdocs
> >    ServerNamewww.zevenwolf.com
> >    ServerAlias zevenwolf.com zevenrodriguez.comwww.zevenrodriguez.com
> > zevenwithaz.comwww.zevenwithaz.com
> >    ErrorLog logs/zevenwolf.com-error_log
> >    CustomLog logs/zevenwolf.com-access_log common
> > <Directory /var/www/vhosts/zevenwolf.com/httpdocs>
> > AllowOverride All
> > </Directory>
> > ScriptAlias  /cgi-bin/ /var/www/vhosts/zevenwolf.com/cgi-bin/
>
> > LoadModule wsgi_module modules/mod_wsgi.so
>
> > WSGIScriptAlias /python_projects /var/www/vhosts/zevenwolf.com/
> > python_projects.wsgi
>
> > <Directory /var/www/vhosts/zevenwolf.com/python_projects>
> > Order deny,allow
> > Allow  from all
> > </Directory>
>
> > </VirtualHost>
>
> > Once i did the change i ran
>
> > service httpd restart
> > this is what i got
> > Stopping httpd:                                            [  OK  ]
> > Starting httpd: [Mon Aug 23 20:15:26 2010] [warn] module wsgi_module
> > is already loaded, skipping
>
> You have a LoadModule like for mod_wsgi twice, or a snippet file is
> being include twice that loads it.
>
>
>
>
>
> >                                                           [  OK  ]
>
> > this is the general apache error log from this time
>
> > [Mon Aug 23 20:15:26 2010] [error] Exception KeyError:
> > KeyError(-1216358640,) in <module 'threading' from '/opt/python2.6.5/
> > lib/python2.6/threading.pyc'> ignored
> > [Mon Aug 23 20:15:26 2010] [error] Exception KeyError:
> > KeyError(-1216358640,) in <module 'threading' from '/opt/python2.6.5/
> > lib/python2.6/threading.pyc'> ignored
> > [Mon Aug 23 20:15:26 2010] [error] Exception KeyError:
> > KeyError(-1216358640,) in <module 'threading' from '/opt/python2.6.5/
> > lib/python2.6/threading.pyc'> ignored
> > [Mon Aug 23 20:15:26 2010] [error] Exception KeyError:
> > KeyError(-1216358640,) in <module 'threading' from '/opt/python2.6.5/
> > lib/python2.6/threading.pyc'> ignored
>
> You aren't using mod_wsgi 3.3. Warning can otherwise be ignored.
>
>
>
>
>
> > [Mon Aug 23 20:15:26 2010] [notice] caught SIGTERM, shutting down
> > [Mon Aug 23 20:15:26 2010] [warn] module wsgi_module is already
> > loaded, skipping
> > [Mon Aug 23 20:15:26 2010] [notice] Digest: generating secret for
> > digest authentication ...
> > [Mon Aug 23 20:15:26 2010] [notice] Digest: done
> > [Mon Aug 23 20:15:26 2010] [notice] Apache configured -- resuming
> > normal operations
>
> > the error log from zevenwolf.com from apache gave me this
>
> > [Mon Aug 23 20:19:47 2010] [error] [client 173.63.156.204] File does
> > not exist: /var/www/vhosts/zevenwolf.com/httpdocs/python_project
> > [Mon Aug 23 20:19:54 2010] [error] [client 173.63.156.204] File does
> > not exist: /var/www/vhosts/zevenwolf.com/httpdocs/python_project
>
> > there is no file in this   /var/www/vhosts/zevenwolf.com/httpdocs/
> > python_project
>
> > the server path where hello.py is located:
> > /var/www/vhosts/zevenwolf.com/python_projects
>
> > The code i am trying to run is located here
> >http://www.zevenwolf.com/python_project/hello.py
>
> You are using the wrong URL, or have got the configuration wrong. You have:
>
>   WSGIScriptAlias /python_projects
> /var/www/vhosts/zevenwolf.com/python_projects.wsgi
>
> This means the URL you would use in the browser is:
>
>  http://www.zevenwolf.com/python_projects
>
> The hello world code should be in file:
>
>   /var/www/vhosts/zevenwolf.com/python_projects.wsgi
>
> So, you are accessing wrong URL based on your configuration, and
> potentially have code file in wrong place and with wrong name as well.
>
> Graham
>
>
>
> > the code use in the hello.py is
>
> > def application(environ, start_response):
> >    status = '200 OK'
> >    output = 'Hello World!'
>
> >    response_headers = [('Content-type', 'text/plain'),
> >                        ('Content-Length', str(len(output)))]
> >    start_response(status, response_headers)
>
> >    return [output]
>
> > i hope that is enough information
>
> > thanks all
>
> > zeven
>
> > On Aug 23, 7:10 pm, Graham Dumpleton <[email protected]>
> > wrote:
> >> Define not run.
>
> >> What documentation are you following?
>
> >> Are you using:
>
> >>  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
>
> >> Use that documentation if you aren't. Also suggest watching the talk:
>
> >>  http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_...
>
> >> Few more comments below.
>
> >> On 24 August 2010 07:48, zevenwolf <[email protected]> wrote:
>
> >> > Hi Everyone,
>
> >> > so I presume I have installed mod_wsgi correctly
>
> >> > I am running apache2.2 and the module is appearing in the modules
> >> > folder
>
> >> > when i run the hello world app it will not run
>
> >> > <VirtualHost *:80>
> >> >    DocumentRoot /var/www/vhosts/zevenwolf.com/httpdocs
> >> >    ServerNamewww.zevenwolf.com
> >> >    ServerAlias zevenwolf.com zevenrodriguez.comwww.zevenrodriguez.com
> >> > zevenwithaz.com ww$
> >> >    ErrorLog logs/zevenwolf.com-error_log
> >> >    CustomLog logs/zevenwolf.com-access_log common
> >> > <Directory /var/www/vhosts/zevenwolf.com/httpdocs>
> >> > AllowOverride All
> >> > </Directory>
> >> > ScriptAlias  /cgi-bin/ /var/www/vhosts/zevenwolf.com/cgi-bin/
>
> >> > LoadModule wsgi_module modules/mod_wsgi.so
>
> >> > WSGIScriptAlias /python_projects /var/www/vhosts/zevenwolf.com/
> >> > python_projects.wsgi
>
> >> Does the file '/var/www/vhosts/zevenwolf.com/python_projects.wsgi'
> >> exist and have the hello world code in it? Down below you mention a
> >> hello.py file, so not even sure you have put code in right place.
>
> >> What URL are you using to try and access the WSGI application?
>
> >> > Alias /python_projects/static /var/www/vhosts/zevenwolf.com/
> >> > python_projects/static
> >> > AddType text/html .py
>
> >> Why do you have the AddType. Not needed for mod_wsgi and bad practice
> >> in general for WSGI applications to not set content type and rely on
> >> Apache to set it.
>
> >> > <Directory /var/www/vhosts/zevenwolf.com/python_projects>
> >> >    Order deny,allow
> >> >    Allow from all
> >> > </Directory>
>
> >> > </VirtualHost>
>
> >> > and this is the code i am running in the hello.py with in the
> >> > directory
> >> > def application(environ, start_response):
> >> >    status = '200 OK'
> >> >    output = 'Hello World!'
>
> >> >    response_headers = [('Content-type', 'text/plain'),
> >> >                        ('Content-Length', str(len(output)))]
> >> >    start_response(status, response_headers)
>
> >> >    return [output]
>
> >> Is this really called 'hello.py'? Where did you put this file?
>
> >> > what could i look at that will tell me that this is installed
> >> > correctly
>
> >> Did you compile from source code or are you trying to use a
> >> precompiled binary package from somewhere?
>
> >> Instructions at:
>
> >>  http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide
>
> >> say how to tell if module loaded, presuming that Apache hasn't been
> >> modified not to show module startup strings in Apache error log.
>
> >> You can also run:
>
> >>   httpd -M
>
> >> Ie., -M option to Apache, and it should list:
>
> >>  wsgi_module (shared)
>
> >> Most important thing is to check your Apache error log.
>
> >> Also don't just say it doesn't work. Post what the error is in browser
> >> and for what URL that occurred, plus what the Apache error log said at
> >> same time.
>
> >> Graham
>
> > --
> > 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 
> > athttp://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.

Reply via email to