I have been googling and reading all kinds of different how-tos, and
configuration guides, and even a great post by Graham Dumpleton but i
just can not seem to get this to work correctly. Here is what we're
doing and please fogive me, i am a UNIX Systems Administrator and not
a django/python/wsgi programmer unfortunately. We have been asked to
create virtual microscope website using the code from
http://code.google.com/p/virtualmicroscope/ and this requires python/
django/google maps api and some other libraries to work correctly (see
this URL for a demo look at what it should look like
http://cloud.med.nyu.edu/virtualmicroscope/). I have this working
pretty well and it looks (temporarily) like the demo site (all the CSS
and everything else are working correctly) using the django manage.py
runserver command. Now, i would like to run this behind apache since i
am moving this out to production, and i am trying to keep it pretty
simple, so i have this in my wsgi.conf file that apache reads:
LoadModule wsgi_module modules/mod_wsgi.so
WSGIScriptAlias / /var/www/django.wsgi
<Directory "/var/www/ccfvm">
Allow from all
</Directory>
and my django.wsgi script looks like the following:
import sys
sys.path.insert(0, '/var/www/ccfvm')
import settings
import django.core.management
django.core.management.setup_environ(settings)
utility = django.core.management.ManagementUtility()
command = utility.fetch_command('runserver')
command.validate()
import django.conf
import django.utils
django.utils.translation.activate(django.conf.settings.LANGUAGE_CODE)
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
However when i restart apache, and go to the URL, it looks like it has
LOST the ability to find the CSS and images that should appear on the
'home' page. And when i look in apache's access.log file i see
requests for that stuff getting 404s but yet i can see the text off
the page.
10.66.236.70 - - [20/Feb/2012:11:49:34 -0500] "GET / HTTP/1.1" 200
11601 "-" "Mozilla/5.0 (Windows NT 6.1; rv:10.0.1) Gecko/20100101
Firefox/10.0.1"
10.66.236.70 - - [20/Feb/2012:11:49:35 -0500] "GET /static/js/
jquery-1.6.4.min.js HTTP/1.1" 404 1767 "http://10.66.236.107/"
"Mozilla/5.0 (Windows NT 6.1; rv:10.0.1) Gecko/20100101 Firefox/
10.0.1"
10.66.236.70 - - [20/Feb/2012:11:49:35 -0500] "GET /static/images/
logo.jpg HTTP/1.1" 404 1746 "http://10.66.236.107/" "Mozilla/5.0
(Windows NT 6.1; rv:10.0.1) Gecko/20100101 Firefox/10.0.1"
10.66.236.70 - - [20/Feb/2012:11:49:35 -0500] "GET /static/css/
default.css HTTP/1.1" 404 1746 "http://10.66.236.107/" "Mozilla/5.0
(Windows NT 6.1; rv:10.0.1) Gecko/20100101 Firefox/10.0.1"
10.66.236.70 - - [20/Feb/2012:11:49:36 -0500] "GET /static/images/
logo.jpg HTTP/1.1" 404 1746 "http://10.66.236.107/" "Mozilla/5.0
(Windows NT 6.1; rv:10.0.1) Gecko/20100101 Firefox/10.0.1"
10.66.236.70 - - [20/Feb/2012:11:49:36 -0500] "GET /static/images/
Histology.jpg HTTP/1.1" 404 1761 "http://10.66.236.107/" "Mozilla/5.0
(Windows NT 6.1; rv:10.0.1) Gecko/20100101 Firefox/10.0.1"
10.66.236.70 - - [20/Feb/2012:11:49:36 -0500] "GET /static/images/
Pathology.jpg HTTP/1.1" 404 1761 "http://10.66.236.107/" "Mozilla/5.0
(Windows NT 6.1; rv:10.0.1) Gecko/20100101 Firefox/10.0.1"
Does anyone have any suggestions of how to properly debug this and
figure out why the path seems to be missing? I appreciate any
assistance you can provide.
Michael Weiner
--
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.