2024-03-12 10:43:07 +00:00
|
|
|
FROM httpd:latest
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y curl libcgi-pm-perl
|
|
|
|
|
|
|
|
# Habilitar mod_rewrite
|
|
|
|
RUN sed -i '/mod_rewrite/s/^#//g' /usr/local/apache2/conf/httpd.conf
|
|
|
|
RUN echo "AddHandler cgi-script .cgi .pl" >> /usr/local/apache2/conf/httpd.conf
|
|
|
|
RUN echo "Include conf/extra/httpd-vhosts.conf" >> /usr/local/apache2/conf/httpd.conf
|
|
|
|
|
|
|
|
# Habilitar mod_cgi
|
|
|
|
RUN sed -i '/mod_cgi/s/^#//g' /usr/local/apache2/conf/httpd.conf
|
|
|
|
RUN echo "LoadModule cgid_module modules/mod_cgid.so" >> /usr/local/apache2/conf/httpd.conf
|
|
|
|
|
|
|
|
# Habilitar reescritura
|
|
|
|
RUN echo "RewriteEngine On" >> /usr/local/apache2/conf/extra/httpd-vhosts.conf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Copiar la configuración de Apache2 y los archivos del sitio
|
|
|
|
COPY apache2.conf /usr/local/apache2/conf/extra/httpd-vhosts.conf
|
|
|
|
|
|
|
|
# RUN chmod +x www/script.pl
|
|
|
|
COPY www/ /usr/local/apache2/htdocs/
|
|
|
|
|
|
|
|
|
|
|
|
# Habilita permisos de ejecución
|
|
|
|
RUN chmod +x /usr/local/apache2/htdocs/script.pl
|
2024-04-17 15:12:46 +00:00
|
|
|
RUN chmod +x /usr/local/apache2/htdocs/script2.pl
|
|
|
|
RUN chmod +x /usr/local/apache2/htdocs/script3.pl
|
|
|
|
RUN chmod +x /usr/local/apache2/htdocs/extract_characters.pl
|
2024-03-12 10:43:07 +00:00
|
|
|
|
|
|
|
# CMD y ENTRYPOINT para iniciar Apache2, según la imagen original
|
|
|
|
CMD ["httpd-foreground"]
|