Reputation: 43
I have 2 docker containers: WordPress exposing port 443, and ownCloud exposing port 8080. Can I add a Perl/httpd container to run exposing port 80?
WordPress includes services wordpress:6.7.2-php8.1-apache and mysql:8.0 (on 3306). ownCloud includes services owncloud/server:10.14 and mariadb:10.11
I have created a Dockerfile for Perl/httpd:
FROM httpd:latest
RUN apt-get update && apt-get -y install \
libapache2-mod-perl2 \
libemail-sender-perl \
libemail-simple-perl \
libemail-valid-perl \
libfile-finder-perl \
libcgi-pm-perl \
libtry-tiny-perl \
libfile-fcntllock-perl \
libjson-perl \
libdatetime-locale-perl \
perl
and an override for httpd.conf, including:
Listen 80
<IfModule !mpm_prefork_module>
LoadModule cgid_module modules/mod_cgid.so
</IfModule>
DocumentRoot "/usr/local/apache2/htdocs"
<Directory "/usr/local/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<Directory "/usr/local/apache2/cgi-bin">
AllowOverride None
Require all granted
Options +ExecCGI
AddHandler cgi-script .pl
</Directory>
and docker-compose.yml:
version: "3"
volumes:
web:
external: true
services:
apache-perl:
image: apache-perl
restart: always
ports:
- 80:80
volumes:
- web:/usr/local/apache2:rw
- ./web-httpd.conf:/usr/local/apache2/conf/httpd.conf:ro
- /opt1/bitnami-wordpress/apache2/htdocs:/usr/local/apache2/htdocs:ro
- /opt1/bitnami-wordpress/apache2/cgi-bin:/usr/local/apache2/cgi-bin:ro
- /opt1/wordpress-bitnami/apache2/logs:/usr/local/apache2/logs:rw
and all my *.pl and *.cgi files in the cgi-bin folder have the execute attribute.
Note that all 3 containers should have the same URL, but with different ports.
Why do I get the following message?
This site can’t be reached hollandnumerics.org.uk refused to connect. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_REFUSED
Upvotes: 1
Views: 34