実現したいこと
メインとは別に検証用として古いバージョンのApache2.2.11のHTTPSサーバーを構築したいです。
発生している問題
https://localhost
にアクセスしても応答がなく、Apacheが起動できていないものと思われます。
該当のソースコード
docker-compose.yml
version: "3" services: dcloud: build: . ports: - "80:80" - "443:443" tty: true
Dockerfile
FROM centos:centos7 RUN yum update -y RUN yum install gcc make pcre pcre-devel wget -y RUN yum -y install expat-devel # apr-1.5.1.tar.gz RUN cd /usr/local/src \ && wget https://archive.apache.org/dist/apr/apr-1.5.1.tar.gz \ && tar -xvzf apr-1.5.1.tar.gz \ && cd apr-1.5.1 \ && ./configure --prefix=/opt/apr/apr-1.5.1 \ && make \ && make install # apr-util-1.5.3.tar.gz RUN cd /usr/local/src \ && wget https://archive.apache.org/dist/apr/apr-util-1.5.3.tar.gz \ && tar -xvzf apr-util-1.5.3.tar.gz \ && cd apr-util-1.5.3 \ && ./configure --prefix=/opt/apr-util/apr-util-1.5.3 --with-apr=/opt/apr/apr-1.5.1 \ && make \ && make test \ && make install # openssl RUN yum install -y zlib-devel perl-core RUN cd /tmp \ && wget https://www.openssl.org/source/old/0.9.x/openssl-0.9.8zh.tar.gz \ && ls -la \ && mkdir /usr/local/src/openssl-0.9.8zh \ && cp /tmp/openssl-0.9.8zh.tar.gz /usr/local/src/openssl-0.9.8zh/openssl-0.9.8zh.tar.gz \ && cd /usr/local/src/openssl-0.9.8zh \ && tar xzf openssl-0.9.8zh.tar.gz \ && cd openssl-0.9.8zh \ && ./config --prefix=/usr/local/lib/openssl-0.9.8zh shared \ && make \ && make install \ && ln -s /usr/local/lib/openssl-0.9.8zh/lib /usr/local/lib/openssl-0.9.8zh/lib64 \ && /usr/local/lib/openssl-0.9.8zh/bin/openssl version ENV PATH $PATH:/usr/local/lib/openssl-0.9.8zh/bin RUN mkdir -p /etc/ld.so.conf.d \ && echo '/usr/local/lib/openssl-0.9.8zh/lib' > /etc/ld.so.conf.d/my.conf \ && ldconfig # httpd RUN cd /usr/local/src \ && wget http://archive.apache.org/dist/httpd/httpd-2.2.11.tar.gz \ && tar -xvzf httpd-2.2.11.tar.gz \ && cd /usr/local/src/httpd-2.2.11 \ && ./configure --prefix=/opt/httpd/httpd-2.2.11 \ --with-included-apr \ --with-apr=/opt/apr/apr-1.5.1 \ --with-apr-util=/opt/apr-util/apr-util-1.5.3 \ --build=arm \ --enable-modules=ssl \ --with-ssl=/usr/local/lib/openssl-0.9.8zh \ # --enable-rewrite=shared \ --enable-so \ && make \ && make install ENV PATH $PATH:/opt/httpd/httpd-2.2.11/bin # httpd.conf RUN sed -i \ -e 's/^#(Include .*httpd-ssl.conf)/\1/' \ -e 's/^#(LoadModule .*mod_ssl.so)/\1/' \ -e 's/^#(LoadModule .*mod_socache_shmcb.so)/\1/' \ -e 's/^#(ServerName www.example.com:80)/ServerName localhost:443/g' \ /opt/httpd/httpd-2.2.11/conf/httpd.conf # # SSLなしの起動確認 # RUN sed -i \ # -e 's/^#(LoadModule .*mod_socache_shmcb.so)/\1/' \ # -e 's/^#(ServerName www.example.com:80)/\1/' \ # /opt/httpd/httpd-2.2.11/conf/httpd.conf # 証明書 COPY ./confssl/* /opt/httpd/httpd-2.2.11/conf/ # start CMD ["apachectl", "-D", "FOREGROUND"]
試したこと
コンテナ内で再起動実行
# apachectl restart httpd not running, trying to start (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs
CMD ["apachectl", "-D", "FOREGROUND"]
をコメントアウトし、コンテナ内でapachectl start
を実行しても反応がありませんでした。
# apachectl start
補足情報
環境
M1 Mac
まだ回答がついていません
会員登録して回答してみよう