Reputation: 1780
I have apache set up on my local machine to serve some django projects. I am trying to develop another site that is not a django site. When I try to look at the non-django site, apache tries to interpret its url through django, and gives an error that the url does not match any patterns in urls.py.
I can see the non-django site by commenting out the django-specific parts of httpd.conf and restarting apache. But I know there is a way to tell apache not to try to interpret certain urls through django, or to only interpret certain urls through django.
I think the relevant parts of my setup are:
The non-django sites consist of static html files, a wordpress blog, and a few simple (non-django) python scripts.
I think I have set up all localhost urls to be interpreted as django urls through this line in httpd.conf, but I can't figure out how to change it:
WSGIScriptAlias / /srv/python-environments/phs_comp_env/phs_competencies/apache/django.wsgi
I am running ubuntu 10.04, apache 2.2, django through mod_wsgi.
What do I need to change, or what other information do I need to provide?
For the record, this is what worked. I placed the non-django site configuration before the django site configuration:
Alias /non-django_site/ /var/www/non-django_site/
<Directory /var/www/non-django_site>
Options +ExecCGI
AddHandler cgi-script .py
</Directory>
Upvotes: 1
Views: 231
Reputation: 58563
You don't provide enough information about the other non Python web application. One can only guess you are talking about PHP. Read:
http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#The_Apache_Alias_Directive
Use the AddHandler method of mapping WSGI application and especially the solution towards the end of that section of the documentation.
Upvotes: 1