djangoをインストールしています。
wsgiのテストは問題ありませんが、デフォルトのファイルをdjangoテストにポイントすると、機能しません。
これは正常に機能するテストです。
デフォルト: /etc/apache2/sites-available/default
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
ServerAdmin webmaster@example.com
DocumentRoot /var/www
<Directory /var/www/documents>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias / /home/ubuntu/djangoProj/micopiloto/application.wsgi
<Directory /home/ubuntu/djangoProj/mysitio/wsgi_handler.py>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
application.wsgi ::~/djangoProj/micopiloto
import os
import sys
sys.path.append('/srv/www/cucus/application')
os.environ['PYTHON_EGG_CACHE'] = '/srv/www/cucus/.python-egg'
def application(environ,
start_response):
status = '200 OK'
output = 'Hello World!MK SS9 tkt kkk'
response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
しかし、デフォルトをapplication_sa.wsgi
djangoテストを指すように変更すると、機能しません:(
application_sa.wsgi
import os, sys
sys.path.append('/home/ubuntu/djangoProj/micopiloto')
os.environ['DJANGO_SETTINGS_MODULE'] = 'micopiloto.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
テストするwsgiを変更するたびに、Apacheサーバーを再起動します。
だから私は何が欠けていますか?
どうもありがとう!