Mabanga
De MochilaWiki
Revisão de 18h00min de 20 de fevereiro de 2015 por Banto Palmarino (discussão | contribs)
Ostras em Kimbundu
em /opt/myenv/proj/socialproject/wsgi.py
import sys
import site
import os
envpath = '/opt/myenv/lib/python2.7/site-packages'
pwd = os.path.dirname(os.path.abspath(__file__))
os.chdir(pwd)
sys.path.append('/opt/myenv/proj/socialproject')
sys.path.append('/opt/myenv/proj/')
site.addsitedir(envpath)
from django.core.wsgi import get_wsgi_application
os.environ['DJANGO_SETTINGS_MODULE'] = 'socialproject.settings'
application = get_wsgi_application()
em /etc/apache2/sites-enabled/projsocial
WSGIScriptAlias /projsocial /opt/myenv/proj/socialproject/wsgi.py
<Directory /var/www/projsocial/>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
Alias /static/ /opt/myenv/proj/timeline/static/
<Directory /opt/myenv/proj/timeline/static>
Order deny,allow
Allow from all
</Directory>