Mudanças entre as edições de "Mabanga"

De MochilaWiki
Ir para navegaçãoIr para pesquisar
(Criou página com 'Ostras em Kimbundu em /opt/myenv/proj/socialproject/wsgi.py <source lang="python"> import sys import site import os envpath = '/opt/myenv/lib/python2.7/site-packages' pwd =...')
 
Linha 19: Linha 19:
 
os.environ['DJANGO_SETTINGS_MODULE'] = 'socialproject.settings'
 
os.environ['DJANGO_SETTINGS_MODULE'] = 'socialproject.settings'
 
application = get_wsgi_application()
 
application = get_wsgi_application()
 +
</source>
 +
 +
em /etc/apache2/sites-enabled/projsocial
 +
<source lang="apache">
 +
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>
 
</source>
 
</source>

Edição das 18h00min de 20 de fevereiro de 2015

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>