Dockerfile apache2

Hi my task claimed that it failed but my dockerifle succesfully build and I had changed the port to 5003 in the apache.conf file.

Could you explain where my error was?

Thank you

@GB1972 if you can share the Dockerfile and the error you have received it will be easier for other people here to assist you.

Yikes… Im not sure if this is the one or not, I might have forgotten to save :frowning:

FROM httpd:2.4.43

RUN sed -i “s/Listen 5003/Listen 80/g” /usr/local/apache2/conf/httpd.conf

RUN sed -i ‘/LoadModule\ ssl_module modules/^#//g’ conf/httpd.conf

RUN sed -i ‘/LoadModule\ socache_shmcb_module modules/^#//g’ conf/httpd.conf

RUN sed -i ‘/Include\ conf/extra/httpd-ssl.conf/s/^#//g’ conf/httpd.conf

COPY ./server.crt /usr/local/apache2/conf/server.crt

COPY ./server.key /usr/local/apache2/conf/server.key

COPY ./index.html /usr/local/apache2/htdocs/

I think this is the result.

@GB1972 was this asked in the question to configure Apache to use SSL ?

Hi Inderpreet, I honestly don’t remember now. I don’t think it did ask for SSL. I had another question with SSL but not this one I belive.


Since as per your Dockerfile Apache is configured to work on SSL but validation might be checking Apache to work on respective port but without SSL so it might have caused this failure.