2👍
I just setup django 1.6.1 with OS 10.9 Server yesterday.
File /Library/Server/Web/Config/apache2/httpd_wsgi2.conf
[..]
WSGIScriptAlias / /Users/jens/Source/macmini/macmini/macmini.wsgi
<Directory /Users/jens/Source/macmini>
Order allow,deny
Allow from all
</Directory>
[..]
File /Library/Server/Web/Config/apache2/webapps/com.apple.webapp.wsgi2.plist
[…]
<?xml version="1.0" encoding="UTF-7"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>com.apple.webapp.wsgi2</string>
<key>displayName</key>
<string>Django 1.6.1 Setup at / </string>
<key>launchKeys</key>
<array/>
<key>proxies</key>
<dict/>
<key>installationIndicatorFilePath</key>
<string>/Users/jens/Source/macmini/macmini/macmini.wsgi</string>
<key>includeFiles</key>
<array>
<string>/Library/Server/Web/Config/apache2/httpd_wsgi2.conf</string>
</array>
<key>requiredModuleNames</key>
<array>
<string>wsgi_module</string>
</array>
</dict>
</plist>
[…]
Propably noteworthy I installed django within the Home directoty of Jens
[…]
macmini:macmini jens$ ls -l
total 72
-rw-r--r-- 1 jens staff 0 14 Jan 20:43 __init__.py
-rw-r--r-- 1 jens staff 133 14 Jan 21:10 __init__.pyc
-rwxr-xr-x 1 jens staff 482 15 Jan 09:43 macmini.wsgi
-rw-r--r-- 1 jens staff 4384 15 Jan 17:15 settings.py
-rw-r--r-- 1 jens staff 3902 15 Jan 17:16 settings.pyc
-rw-r--r-- 1 jens staff 298 14 Jan 20:43 urls.py
-rw-r--r-- 1 jens staff 413 14 Jan 21:53 urls.pyc
-rwxr-xr-x 1 jens staff 466 14 Jan 23:46 wsgi.py
-rw-r--r-- 1 jens staff 590 14 Jan 21:52 wsgi.pyc
[…]
And finaly the wsgi.py file
[…]
"""
WSGI config for macmini project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "macmini.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
[…]
Make sure that you now create a virtual site within the Server.app.
Cheers, Jens
Source:stackexchange.com