A WSGI connector for the datatracker, to let us run under mod_wsgi.
- Legacy-Id: 6157
This commit is contained in:
parent
5033aba13e
commit
dbda8e8c53
51
ietf/wsgi.py
Normal file
51
ietf/wsgi.py
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
"""
|
||||||
|
WSGI configuration for the datatracker.
|
||||||
|
|
||||||
|
The following apache datatracker configuration has been used together with a
|
||||||
|
datatracker checkout of trunk@ under /srv/www/ietfdb/ to run this on a development
|
||||||
|
server using mod_wsgi under apache. For a production server, additional access
|
||||||
|
restrictions are needed for the secretariat tools.
|
||||||
|
|
||||||
|
----
|
||||||
|
# This directive must be set globally, not inside <Virtualhost/>:
|
||||||
|
WSGIPythonEggs /var/www/.python-eggs/
|
||||||
|
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName tracker.tools.ietf.org
|
||||||
|
|
||||||
|
DocumentRoot "/srv/www/ietfdb/static/"
|
||||||
|
|
||||||
|
AliasMatch "^/((robots.txt|favicon.ico|images|css|js|media)(.*))$" /srv/www/ietfdb/static/$1
|
||||||
|
AliasMatch "^/secretariat/(img|css|js|error)(/|$)" /srv/www/ietfdb/static/secretariat/$1
|
||||||
|
AliasMatch "^/secr/(img|css|js|error)(/|$)" /srv/www/ietfdb/static/secr/$1
|
||||||
|
|
||||||
|
WSGIScriptAlias / /srv/www/ietfdb/ietf/wsgi.py
|
||||||
|
|
||||||
|
<Location "/accounts/login">
|
||||||
|
AuthType Digest
|
||||||
|
AuthName "IETF"
|
||||||
|
AuthUserFile /var/local/loginmgr/digest
|
||||||
|
AuthGroupFile /var/local/loginmgr/groups
|
||||||
|
AuthDigestDomain http://tools.ietf.org/
|
||||||
|
Require valid-user
|
||||||
|
</Location>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
----
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import syslog
|
||||||
|
|
||||||
|
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
|
if not path in sys.path:
|
||||||
|
sys.path.insert(0, path)
|
||||||
|
|
||||||
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ietf.settings")
|
||||||
|
|
||||||
|
import django.core.handlers.wsgi
|
||||||
|
application = django.core.handlers.wsgi.WSGIHandler()
|
||||||
|
|
Loading…
Reference in a new issue