Greetings. I have to deploy a Django application in Ubuntu for my current assignment. I've already finished my application on Windows, yet I'm having trouble migrating it to Ubuntu. It runs just fine when I use Django's server (python manage.py runserver). However, my assignment specifically requires that the application runs on Apache2 (and other web servers later on, but for now I just need to worry about Apache2).
httpd.conf: LoadModule rewrite_module libexec/mod_rewrite.so LoadModule wsgi_module modules/mod_wsgi.so WSGIScriptAlias / /home/miguel/Blog/apache/django.wsgi django.wsgi: import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'Blog.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() sys.path.append('/home/miguel/') sys.path.append('/home/miguel/Blog/') --------------------------------- My Django project is, naturally, located in /home/miguel/Blog/. The blog application is located in /home/miguel/Blog/blog/. Here's what the apache log reads: [Thu May 21 11:10:55 2009] [warn] module rewrite_module is already loaded, skipping [Thu May 21 11:10:55 2009] [warn] module wsgi_module is already loaded, skipping [Thu May 21 11:10:55 2009] [notice] mod_python: Creating 8 session mutexes based on 6 max processes and 25 max threads. [Thu May 21 11:10:55 2009] [notice] mod_python: using mutex_directory / tmp [Thu May 21 11:10:55 2009] [notice] Apache/2.2.9 (Ubuntu) mod_python/ 3.3.1 Python/2.5.2 mod_wsgi/2.3 configured -- resuming normal operations [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] mod_wsgi (pid=13276): Exception occurred processing WSGI script '/home/miguel/ Blog/apache/django.wsgi'. [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] Traceback (most recent call last): [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] File "/usr/lib/ python2.5/site-packages/django/core/handlers/wsgi.py", line 239, in __call__ [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] response = self.get_response(request) [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] File "/usr/lib/ python2.5/site-packages/django/core/handlers/base.py", line 67, in get_response [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] response = middleware_method(request) [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] File "/usr/lib/ python2.5/site-packages/django/middleware/common.py", line 57, in process_request [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] _is_valid_path("%s/" % request.path_info)): [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] File "/usr/lib/ python2.5/site-packages/django/middleware/common.py", line 142, in _is_valid_path [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] urlresolvers.resolve(path) [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] File "/usr/lib/ python2.5/site-packages/django/core/urlresolvers.py", line 246, in resolve [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] return get_resolver(urlconf).resolve(path) [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] File "/usr/lib/ python2.5/site-packages/django/core/urlresolvers.py", line 181, in resolve [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] sub_match = pattern.resolve(new_path) [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] File "/usr/lib/ python2.5/site-packages/django/core/urlresolvers.py", line 124, in resolve [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] return self.callback, args, kwargs [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] File "/usr/lib/ python2.5/site-packages/django/core/urlresolvers.py", line 133, in _get_callback [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str (e)) [Thu May 21 05:11:00 2009] [error] [client 127.0.0.1] ViewDoesNotExist: Could not import Blog.blog.views. Error was: No module named blog.views Can anyone help me solve this? Any ideas why it's stating that the "blog.views" module doesn't exist? Thank you in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---