gpt4 book ai didi

ubuntu - 'sudo service apache2 start' 在 ubuntu18.04 上不起作用

转载 作者:行者123 更新时间:2023-12-04 18:31:38 24 4
gpt4 key购买 nike

我已经在我的 ubuntu18.04 上安装了 laravel。
我制作了/etc/apache2/sites-available/laravel.conf 文件。

<VirtualHost *:80>
ServerName yourdomain.tld

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/your-project/public

<Directory /var/www/html/your-project>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>


然后在终端上运行这些代码:

sudo a2dissite 000-default.conf
sudo a2ensite laravel.conf
sudo a2enmod rewrite
sudo service apache2 restart

但是当我运行“sudo service apache2 restart”时,会出现错误代码。

Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.


我同时运行了“systemctl status apache2.service”和“journalctl -xe”,但也出现了错误代码:

apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Mon 2018-10-29 01:48:17 PDT; 5min ago
Process: 40882 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Oct 29 01:48:17 ubuntu apachectl[40882]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress thi
Oct 29 01:48:17 ubuntu apachectl[40882]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:80
Oct 29 01:48:17 ubuntu apachectl[40882]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80
Oct 29 01:48:17 ubuntu apachectl[40882]: no listening sockets available, shutting down
Oct 29 01:48:17 ubuntu apachectl[40882]: AH00015: Unable to open logs
Oct 29 01:48:17 ubuntu apachectl[40882]: Action 'start' failed.
Oct 29 01:48:17 ubuntu apachectl[40882]: The Apache error log may have more information.
Oct 29 01:48:17 ubuntu systemd[1]: apache2.service: Control process exited, code=exited status=1
Oct 29 01:48:17 ubuntu systemd[1]: apache2.service: Failed with result 'exit-code'.
Oct 29 01:48:17 ubuntu systemd[1]: Failed to start The Apache HTTP Server.


如何启动 Apache Http 服务器。
来人帮帮我!

最佳答案

一步一步地按照这个链接,你会得到你的解决方案。
仅当我们配置防火墙或未正确配置防火墙时才会发生这种情况。
看到这个https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-16-04

关于ubuntu - 'sudo service apache2 start' 在 ubuntu18.04 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53041858/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com