Я попытался запустить контейнер php: apache. Затем я применяю настройку виртуального хоста и выхожу из контейнера, и я использовал 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