pretzlaw / docker-php

Docker images for multiple (old) PHP Versions
17 stars 7 forks source link

5.3-apache: You don't have permission to access #3

Closed MohammadMQ closed 4 years ago

MohammadMQ commented 5 years ago

When running the image 5.3-apache and then trying to access: http://127.0.0.1:8000/ I get following error

Forbidden You don't have permission to access / on this server.

pretzlaw commented 4 years ago

Hello there. This is normal until there is an "index.html", "index.php" or some other file provided. See this docker-compose.yml for example:

version: "3"

services:
  php:
    image: pretzlaw/php:5.3-apache
    ports:
    - "8000:80"
    volumes:
    - ".:/var/www/html"

Put an index.html in the same directory where the "docker-compose.yml" is. After running docker-compose up -d it will show up in the browser:

image

Does this solve the problem?

pretzlaw commented 4 years ago

This got old so we close this for now. Hopefully the comment helped :heart: