Error AH02454 and AH01079 on amazon-linux2 and httpd does not start properly.

Asked 1 years ago, Updated 1 years ago, 83 views

 FROM amazonlinux:2

ENV COMPOSER_ALLOW_SUPERUSER=1
ENV PATH = $PATH: vendor/bin

RUN yum update-y\
    &yum upgrade-y\
    &yum install-y\
      curl\
      git\
      libxml2\
      libxml2-develop\
      httpd\
      mysql\
      gcc\
      vim\
      make

RUN amazon-linux-extras install php 7.2

RUN yum install-y\
      php-develop\
      php-mbstring\
      php-opcache\
      php-soap\
      php-mysqlnd\
      php-pear

RUN yum clean all

RUN pecl install xdebug

RUN mkdir-p/www
RUN ln-s/www/xxxxxxxxxxxxxxxxx/xxxxxxxxx/etc/httpd/conf.d/
RUN ln-s/www/xxxxxxxxxxx/config/xdebug.ini/etc/php.d/

EXPOSE 80
CMD ["/usr/sbin/httpd", "-D", "FOREGROUND" ]

Write the above Dockerfile and build succeeded
After docker run, the following error appears

/var/log/httpd/error_log

[suexec:notice][pid1] AH01232:suEXEC mechanism enabled (wrapper:/usr/sbin/suexec)
[lbmethod_heartbeat:notice] [pid1] AH02282 - No slotmem from mod_heartmonitor
[http2:warn] [pid1] AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server.HTTP/2 has more orders in this regard and the currently selected mpm will just do. This is an advisory warning. You will be the tool.
[http2:warn] [pid1] AH02951—mod_ssl does not seeem to be enabled
[mpm_prefork:notice] [pid1] AH00163: Apache/2.4.33() configured -- resumming normal operations
[core:notice] [pid1] AH00094: Command line: '/usr/sbin/httpd-D FOREGROUND'

Access Logs

[proxy:error][pid7](2) No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket/run/php-fpm/www.sock(*) failed
[proxy_fcgi:error] [pid7] [client172.17.0.1:34136] AH01079: failed to make connection to backend: httpd-UDS
172.17.0.1 - [19/Jul/2018:08:59:29+0000] "GET/HTTP/1.1" 503299
[proxy:error][pid6](2) No such file or directory: AH02454:FCGI:attempt to connect to Unix domain socket/run/php-fpm/www.sock(*)failed
[proxy_fcgi:error] [pid6] [client172.17.0.1:34138] AH01079: failed to make connection to backend: httpd-UDS, refer: http://localhost:8890/

Browser screen (http://localhost:8890/)

Service Unavailable
The server is temporary enable to service your request due to maintenance downtime or capacity problems. Please try again later.

httpd doesn't work well with an error

php apache docker amazon-linux

2022-09-30 17:22

1 Answers

Before the Docker build, first check the configuration so that httpd can start.

  • You seem to be trying to use mod_http2, but it is not available in prefork MPM.Consider a worker or event.
  • mod_ssl does not appear to be installed
  • fcgi seems to be trying to connect to php-fpm, but either the php-fpm process is not started or the socket path is not correct.If it's httpd, wouldn't it be okay to use a module without php-fpm?


2022-09-30 17:22

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.