Created
October 25, 2012 06:17
-
-
Save haoch/3950814 to your computer and use it in GitHub Desktop.
common wsgi configure file for django application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" WSGI configure file for django application | |
Default configure file path: /etc/httpd/conf.d/wsgi.conf """ | |
import os | |
import sys | |
## setup path for mod_wsgi | |
sys.path.append(os.path.dirname(os.path.abspath(__file__))) | |
# add more path here | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' | |
import django.core.handlers.wsgi | |
application = django.core.handlers.wsgi.WSGIHandler() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WSGI configure file for Apache HTTP Server | |
Listen 80 | |
<VirtualHost *:80> | |
ServerName server_name | |
ServerAlias server_alias_name | |
ServerAlias 127.0.0.1 | |
DocumentRoot /data/... | |
<Directory /data/...> | |
Order allow,deny | |
Allow from all | |
</Directory> | |
WSGIScriptAlias / /.../webapp.wsgi | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment