我可以在本地运行Django,但我无法使用Apache部署它。
我的错误记录:
[time 2018] [mpm_event:notice] [pid 23027:tid 140623621068672] AH00491: caught SIGTERM, shutting down
[time 2018] [wsgi:warn] [pid 23278:tid 139675061790592] mod_wsgi: Compiled for Python/2.7.11.
[time 2018] [wsgi:warn] [pid 23278:tid 139675061790592] mod_wsgi: Runtime using Python/2.7.12.
[time 2018] [mpm_event:notice] [pid 23278:tid 139675061790592] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
/etc/apache2/sites-enabled/000-default.conf:
<VirtualHost *:80>
ServerName xxx.yyy.zzz
#https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04
Alias /static /home/user/project/app/static
<Directory /home/user/project/app/static>
Require all granted
</Directory>
<Directory /home/user/project/project>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess project python-path=/home/user/project python-home=/home/user/project/env
WSGIProcessGroup project
WSGIScriptAlias / /home/user/project/project/wsgi.py
WSGIApplicationGroup %{GLOBAL}
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
我没有任何http.conf文件或日志。