Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

230
Visualizações
Docker httpd doesn't match a volume

I pulled httpd: docker pull httpd.

When I started the container:

docker run --name httpd --rm -p 80:80 -v $(pwd)/htdocs:/htdocs -d httpd

I see the original index.html page even if in my htdocs I put my personal index page.

Can someone help me?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You're mounting the directory on /htdocs, but that's not where Apache is looking for files. If you examine the Apache configuration in the httpd image, DocumentRoot points at /usr/local/apache2/htdocs:

root@6eaea8a511b9:/usr/local/apache2# grep DocumentRoot conf/httpd.conf
# DocumentRoot: The directory out of which you will serve your
DocumentRoot "/usr/local/apache2/htdocs"

So your command line needs to be:

docker run --name httpd --rm -p 80:80 -v $(pwd)/htdocs:/usr/local/apache2/htdocs -d httpd

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda