I used to define --hostname option when using apache containers to avoid AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using X.X.X.X. Set the 'ServerName' directive globally to suppress this message error
If --hostname option and SERVERNAME env var are set to the same value, the application can't be reached and I have the following error
[autoindex:error] [pid XX:tid XX] [client XXXX:xx] 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 can be solve in 2 different way in Dockerfile:
- Disable default website l22
a2enmod rewrite && a2ensite signaturepdf && a2dissite 000-default
- Replace default website l20
envsubst < /usr/local/signaturepdf/config/apache.conf > /etc/apache2/sites-available/000-default.conf && \ and don't enable signaturepdf l22 a2enmod rewrite