I have created a new folder and copy my index html from that image. The image looks like this
FROM centos:latest
RUN yum update -y
RUN yum install httpd -y
RUN mkdir -p /var/www/html/gci/
COPY ./public-html/ /var/www/html/gci/
ENTRYPOINT ["/usr/sbin/httpd","-D","FOREGROUND"]
However this defaults to serving from /var/www/html/ and not from /var/www/html/gci
Without this new folder, it works just fine serving index.html file I have in public-html folder.
What am I doing wrong?
2
Answers
oh it works, just needed to add /gci when searching in the browser and Kaboom works like magic
You should edit Apache2 conf to serve directly from /cgi
First, create a cgi.conf file (or whatever name you want), with those values at minimum *(it would be better to delve a bit more on apache2 conf than just this) *
Then add this file in your image
ADD cgi.conf /etc/apache2/sites-available
Then deactivate the default site and activate yours
RUN a2dissite 000-default.conf && a2ensite cgi.conf
After that, when launching your containerand trying to access it, you’ll directlygo to the /cgi directory.