On 8 December 2010 21:23, dalmer <[email protected]> wrote: > to be honest i dont know why, the document was created by another > person, and it works good in all the computers. What is the correct > way to create the file??
I would suggest you perhaps you read up on fundamentals of installing and configuring mod_wsgi. See: http://code.google.com/p/modwsgi/wiki/InstallationInstructions Specifically: http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide Get things working for a hello world program and only then look at Django, with the latter covered by: http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango Graham > thank you > > On 8 dic, 11:18, Graham Dumpleton <[email protected]> wrote: >> On 8 December 2010 21:10, dalmer <[email protected]> wrote: >> >> >> >> > Hello, I am having problems to install the module in my new computer. >> > I dont know why I am getting this error in the error log >> >> > [Wed Dec 08 11:01:47 2010] [error] Traceback (most recent call last): >> > [Wed Dec 08 11:01:47 2010] [error] File "/home/user/workspace/xxxx/ >> > apache/django.wsgi", line 1, in <module> >> > [Wed Dec 08 11:01:47 2010] [error] import sys,os >> > [Wed Dec 08 11:01:47 2010] [error] ImportError: No module named os >> > [Wed Dec 08 11:01:49 2010] [error] mod_wsgi (pid=13165): Unable to >> > import 'site' module. >> > [Wed Dec 08 11:01:49 2010] [error] Traceback (most recent call last): >> > [Wed Dec 08 11:01:49 2010] [error] File "/home/user/workspace/xxxx/ >> > apache/django.wsgii", line 1, in <module> >> > [Wed Dec 08 11:01:49 2010] [error] import sys,os >> > [Wed Dec 08 11:01:49 2010] [error] ImportError: No module named os >> >> > The strange thing is that in the old computer everything works >> > perfect, and is working perfect in the computer of my partners. My old >> > computer was an ubuntu 9, and the new is 10 >> >> > the file django.wsgi contains this >> >> > import sys,os >> > sys.path.append('/home/user/workspace') >> > sys.path.append('/home/user/workspace/bebabum') >> > os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' >> >> > import django.core.handlers.wsgi >> > application = django.core.handlers.wsgi.WSGIHandler() >> >> > but i think the problem comes from the conf file, that contains this >> >> > WSGIPythonPath /usr/local/lib/python2.6:/usr/local/lib/python2.6:/usr/ >> > lib/python2.6/site-packages:/usr/local/lib/python2.6/site-packages/ >> > django >> > WSGIPythonHome /usr/local/lib/python2.6:/usr/local/lib/python2.6:/usr/ >> > lib/python2.6/site-packages:/usr/local/lib/python2.6/site-packages/ >> > django >> >> Because you got the definition of WSGIPythonHome wrong. It should be just: >> >> WSGIPythonHome /usr/local/lib/python2.6 >> >> if you want to point it at an alternate Python installation to a default. >> >> Even then, needing to set WSGIPythonHome is the exception so why are >> you doing it? >> >> One valid reason is as outlined in: >> >> http://code.google.com/p/modwsgi/wiki/InstallationIssues#Multiple_Pyt... >> >> You are also setting WSGIPythonPath for no good reason that I can see >> and have that wrong as well. >> >> Why are you trying to mix installed Python files from multiple >> installations in the first place. That is a potential recipe for >> disaster. >> >> So, please explain why you are setting WSGIPythonHome and >> WSGIPythonPath in the first place. You normally should need to fiddle >> with WSGIPythonHome. >> >> Also be aware that WSGIPythonPath doesn't apply to daemon mode processes >> anyway. >> >> Graham >> >> > #WSGIDaemonProcess user=intrack group=intrack python-path=/usr/local/ >> > lib/python2.6/site-packages processes=2 threads=25 >> >> > <VirtualHost *:80> >> > DocumentRoot /home/user/workspace/empty >> > ServerNamewww.lh-xxx.com >> >> > Alias /media/ /home/user/workspace/xxx/media/ >> >> > WSGIScriptAlias / /home/user/workspace/xxx/apache/django.wsgi >> >> > ErrorLog /var/log/apache2/xxx.local-error.log >> > CustomLog /var/log/apache2/xxx.local-access.log Combined >> > </VirtualHost> >> >> > any idea?? >> >> > thank you >> >> > -- >> > 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. > > -- 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.
