2
votes

I am trying to serve my webpages using Apache and was wondering the difference between wsgi.py and django.wsgi.

There is documentation on both but I'm not sure which one I should implement. I am running on Django 1.4, Apache 2.2.2, Ubuntu 12.04 LTS

https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/ https://docs.djangoproject.com/en/1.2/howto/deployment/modwsgi/

Other questions:

  1. Currently I'm implementing django.wsgi and have commands in that file. If I have to create wsgi.py, what should I put into the file? I can't find documentation on that.

  2. Do I need to alter my virtualhost file? I am only running 1 website off my server.

2

2 Answers

1
votes

This files have same content but different names. In older django versions there is no wsgi.py file in project template and in docs that file was named django.wsgi. In recent versions wsgi.py file present in dir from start of project.

Name it like you want, if you havent one in your project. Just make sure that link to it in apache site conf is correct.

0
votes

You can see the difference in the urls itself which you have posted. First url is from development documentation other is referring to older Django 1.2 Documentation.

In Earlier Version < 1.4 there was no wsgi.py file. But Since 1.4 it automatically creates wsgi.py file in your project directory.

Read the upgrade notes here: