Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

327
Vistas
How to setup ErrorDocument alongside VirtualDocumentRoot in apache2?

I have some docker containers and one of them handle the server with apache2. Also, I handle multiple subdomains with VirtualDocumentRoot, but the problem is, I can't setup VirtualDocumentRoot alongside ErrorDocument with a custom file. The ErrorDocument can't find my custom file either in "/usr/local/apache2/" or "/sites/live". I can use a URL and it works but it's not I want. Can someone help me please?

Dockerfile:

server:
  build: ./server
  environment:
    - SITES_PATH=/sites/live
  ports:
    - "8888:80"
  volumes:
    - sites:/sites:ro

httpd.conf

UseCanonicalName Off

LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
CustomLog "logs/access_log" vcommon

VirtualDocumentRoot "${SITES_PATH}/%0"
VirtualScriptAlias  "${SITES_PATH}/%0/cgi-bin"

<Directory ${SITES_PATH}>
    ErrorDocument 404 /custom_404.html
    AllowOverride all
    Require all granted
</Directory>
over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda