PHP apache mysql image

Hi,
I am new to docker here is my problem. I am in Ubuntu18.04
I am trying to set a php-apache-mysql- environment. I have a php5.6 environment already. I need a php7 environment also without effecting the previous one.
I have installed docker and checked the hello-world docker images working fine.
Then I have followed this youtube tutorial
https://www.youtube.com/watch?v=_mwWxgfZ7Zc
now when i have started the docker, it started well with this message

Attaching to php73
php73 | AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.18.0.2. Set the ‘ServerName’ directive globally to suppress this message
php73 | AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.18.0.2. Set the ‘ServerName’ directive globally to suppress this message

then i tried to access the ip 172.18.0.2:8000 it shows below message
also i tried to access 127.0.0.1:8000 as well same result

Forbidden

You don’t have permission to access this resource.

Apache/2.4.38 (Debian) Server at 127.0.0.1 Port 8000

This is the message in command promt

php73 | [Sat Mar 28 20:48:54.863069 2020] [autoindex:error] [pid 16] [client 172.18.0.1:41278] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive


this is my docker-composer.yml

version: ‘3.3’
services:
web:
image: php:7.3-apache
container_name: php73
volumes:
- ./php:/var/www/html/docker
ports:
- 8000:80

while searching in google I have found it is something related to the virtual host related issue.
and I have a virtual host using in the native LAPM server example.local
this is the site-enabled/example.conf starting

<VirtualHost 0.0.0.0:80>
ServerName laso.local

any help is appreciated

This is just a warning, you can ignore it.

This error simply means that you have no index.html or index.php file at /var/www/html. You mount your volume into /var/www/html/docker, so the URL of your application is localhost:8000/docker.

1 Like

Thank you so much @tekki you saved my day :innocent: