Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

2.5K
Views
¿Cómo habilitar el módulo mod_rewrite para la imagen httpd oficial de docker?

Estoy ejecutando una pila LAMP en docker con la ayuda de docker-compose, y para el servidor web estoy usando la imagen oficial de https://hub.docker.com/_/httpd . El contenedor httpd es creado por un Dockerfile:

 ARG APACHE_VERSION FROM httpd:$APACHE_VERSION RUN apt-get update;\apt-get upgrade;\a2enmod rewrite COPY demo.apache.conf /usr/local/apache2/conf/demo.apache.conf RUN echo "Include /usr/local/apache2/conf/demo.apache.conf" \ >> /usr/local/apache2/conf/httpd.conf

Estoy tratando de habilitar mod_rewrite con el comando \a2enmod rewrite pero aparece el siguiente error durante la compilación:

 /bin/sh: 1: a2enmod: not found ERROR: Service 'apache' failed to build: The command '/bin/sh -c apt-get update;\apt-get upgrade;\a2enmod rewrite' returned a non-zero code: 127

a2enmod está fallando: según mi lectura, solo está disponible en un sistema debian y la imagen base de httpd no lo tiene.

¿Cómo puedo habilitar el módulo mod_rewrite para esta imagen httpd oficial de docker durante la compilación?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Terminé descifrarlo. Tuve que habilitar el módulo en el archivo apache .conf agregando la línea:

 LoadModule rewrite_module modules/mod_rewrite.so
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!