当我跑步时
sudo service apache2 restart
我收到错误
unable to resolve host hostname
当我查看error.txt时,它说这是我的WSGI配置。
这是我的WSGI脚本。
import os
import sys
from django.core.handlers.wsgi import WSGIHandler
import django
os.environ['DJANGO_SETTINGS_MODULE'] = 'app.settings'
sys.executable = '/usr/lib/python2.7/dist-packages'
application = WSGIHandler()
django.setup()
EDIT1:
这是我的apache2文件。我确实将WSGI文件更改为/user/app/app_settings/wsgi.py
<VirtualHost website:80>
ServerName website.com
ServerAlias www.website.com
ServerAdmin email@website.com
DocumentRoot /home/user/app/static
WSGIScriptAlias / /home/user/app/app_settings/wsgi.py
<Directory /home/user/app/>
Order allow,deny
Allow from all
Require all granted
</Directory>
#Alias /robots.txt /var/www/user/app/robots.txt
#Alias /favicon.ico /var/www/user/app/favicon.ico
#Alias /images /home/user/app/static/images
#Alias /static /home/user/app/static/
ErrorLog /var/www/website/error.log
#CustomLog /var/www/website/access.log combined
</VirtualHost>