Docker official image - Php7.3 (Apache) not able to change Document root

Dear Team

Trying to building PHP7.3 (Apache), and want to reset the DocumentRoot to /var/www instead of /var/www/html

  1. Have been successful to get the DocumentRoot in the etc/apache2/sites-available/000-default.conf

  2. The environment variable is correctly set
    root@e2fbf4922186:/usr/local/etc/php# set

  3. However, even after these changes, correctly reflected, the php7.3 is still picking the document root as /var/www/html
    (As a new user, I cannot post > 1 image, hence posting the text component of phpinfo() for the DOCUMENT_ROOT part.

    |CONTEXT_PREFIX|no value|

The Docker, compose files complete successfully - and result in working containers, EXCEPT for this issue

Any help, deeply appreciated.

Seems /var/www/html is hard-coded into the Dockerfile, look here. Because it appears at so many places there is no easy way to change it.


Thanks - I had an declaration in the compose file.

That has been fixed.


After more tinker with the httpd.conf record, I changed the DIRECTORY tab to state permit from all rather than deny from all.