japhyr
japhyr

Reputation: 1780

How do I host a django and a non-django site on my local development server?

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:

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

Answers (1)

Graham Dumpleton
Graham Dumpleton

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

Related Questions