【发布时间】:2019-08-14 00:40:40
【问题描述】:
我尝试运行 php:apache 容器。然后我应用虚拟主机设置并退出容器 bash,我使用了docker restart <containerid>,但我无法启动。然后我用docker logs <containerid>检查了日志,它说你在000-default.conf中有一个语法
现在这是我的问题:如果我无法启动容器,我如何连接容器 bash 并打开 000-default.conf 并修复语法错误?有没有其他办法呢?
这是日志输出:
C:\Users\Utku>docker logs bb
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
[Sat Mar 23 01:05:26.411235 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.25 (Debian) PHP/7.2.16 configured -- resuming normal operations
[Sat Mar 23 01:05:26.411274 2019] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
[Sat Mar 23 01:05:37.388586 2019] [autoindex:error] [pid 16] [client 172.17.0.1:40982] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive
localhost:80 172.17.0.1 - - [23/Mar/2019:01:05:37 +0000] "GET / HTTP/1.1" 403 501 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0"
localhost:80 172.17.0.1 - - [23/Mar/2019:01:05:37 +0000] "GET /favicon.ico HTTP/1.1" 404 500 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0"
localhost:80 172.17.0.1 - - [23/Mar/2019:01:06:55 +0000] "GET / HTTP/1.1" 200 286 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0"
[Sat Mar 23 01:07:53.847828 2019] [mpm_prefork:notice] [pid 1] AH00169: caught SIGTERM, shutting down
AH00526: Syntax error on line 35 of /etc/apache2/sites-enabled/000-default.conf:
Invalid command 'sadasd', perhaps misspelled or defined by a module not included in the server configuration
【问题讨论】:
-
请发布所记录的确切错误,以帮助我们帮助您解决问题。
标签: docker