【问题标题】:Amazon Lightsail: Bitnami LAMP server website hosting: sudo service apache2 restartAmazon Lightsail:Bitnami LAMP 服务器网站托管:sudo service apache2 restart
【发布时间】:2018-02-18 14:09:05
【问题描述】:

我正在尝试按照此处的指南进行操作: http://www.servermom.org/how-to-add-new-site-into-your-apache-based-ubuntu-server/ 在网络上托管一些 PHP 文件。一切正常,直到倒数第二步:标题中的命令。我得到的控制台消息如下:

bitnami@ip-*not important*:~$ sudo service apache2 restart
 * Restarting web server apache2        
AH00112: Warning: DocumentRoot [/var/www/html] does not exist
AH00558: apache2: Could not reliably determine the server's fully qualified do
main name, using 127.0.0.1. Set the 'ServerName' directive globally to suppres
s this message
(98)Address already in use: AH00072: make_sock: could not bind to address [::]
:80
(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.
[fail]
 * The apache2 instance did not start within 20 seconds. Please read the log f
iles to discover problems

我用 nano 打开 /var/log/apache2 中的 access.log 和 error.log 文件,它们都显示为空。关于为什么“行动'开始'失败”的任何想法?

提前感谢您的帮助

【问题讨论】:

    标签: apache amazon-web-services server web-hosting amazon-lightsail


    【解决方案1】:

    Bitnami 将受其控制的系统置于非标准位置。它们可以在/opt/bitnami 下找到。我建议查看他们的Documenation on the configuration of Apache

    常见差异:

    • 配置存储在/opt/bitnami/apps/myapp/conf/
    • /var/www 之类的基本文件夹是特定于应用程序的,例如 /opt/bitnami/apps/<app_name>/htdocs/,这是您的应用程序的名称。
    • 可以使用sudo /opt/bitnami/ctlscript.sh restart apache 重新启动 Apache
    • 访问和错误日​​志分别位于 /opt/bitnami/apache2/logs/access_log/opt/bitnami/apache2/logs/error_log

    希望这能帮助您找到正确的方向。

    【讨论】:

    • 这里是主要条目 /opt/bitnami/apache2/conf/bitnami/bitnami.conf
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-02-24
    • 2020-12-06
    • 1970-01-01
    • 2010-09-24
    • 2020-10-29
    • 1970-01-01
    • 2013-02-14
    相关资源
    最近更新 更多