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

227
Views
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 answers
Answer question

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 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!