我想在Google Compute Engine Debian8 VM上設置我的Django-python項目。我在/etc/apache2/sites-available/000-default.conf & /etc/apache2/sites-available/default-ssl.conf
文件中做了幾個配置更改 然後嘗試重新啓動服務器。我得到以下錯誤。卸載&重新安裝apache2也沒有解決此錯誤。有任何建議來解決這個問題?Django Python項目的Apache&mod_wsgi設置
命令:
sudo service apache2 restart
錯誤:
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
命令:
sudo systemctl status apache2.service -l
錯誤:
apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2)
Active: active (exited) since Wed 2016-08-31 05:08:43 UTC; 3min 37s ago
Process: 3539 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
Process: 3521 ExecReload=/etc/init.d/apache2 reload (code=exited, status=1/FAILURE)
Process: 3546 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
Unit apache2.service entered failed state.
Starting LSB: Apache2 web server...
Starting web server: apache2(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
AH00015: Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
.
Started LSB: Apache2 web server.
謝謝,
如果nginx的是作爲一種服務進行管理,你會發現它回來了啓動和nginx的和Apache會爭取拿到80端口的每個主機重新啓動的時間。你應該確保nginx沒有設置爲自動作爲服務啓動。 –
好的。這怎麼能保證? – Naveen
不知道。取決於您的Linux變體正在使用的管理系統。 –