以下错误消息有问题:
Error: "500 Internal Server Error"
İ在apache2上启动django项目。
APACHE2配置文件:
<VirtualHost *:80>
ServerAdmin biisguzar@gmail.com
ServerName asistan.com
ServerAlias www.asistan.com
DocumentRoot /var/www/asistan
Alias /static/ /var/www/asistan/static/
WSGIScriptAlias / "/var/www/asistan/asistan/wsgi.py"
<Directory /var/www/asistan>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
DJANGO WSGİ.PY FİLE:
import os,sys
sys.path.append('/var/www')
sys.path.append('/var/www/asistan')
sys.path.append('/var/www/asistan/asistan')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "asistan.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
第SS页:
在settings.py中,确保已设置变量ALLOWED_HOSTS以包含域的名称。如果不是,那么每当变量DEBUG设置为False时,就会出现500个错误。例如:
Here's the documentation for ALLOWED_HOSTS
相关问题 更多 >
编程相关推荐