# Apache HTTP Server — PHP application VirtualHost
# Generated by RDT (Rambo Docker Tools)
# Image: php:apache (Apache + mod_php pre-configured)
# Mount your PHP source to /var/www/html
# To customise, edit this file and run `rdt add apache-php` again (existing files are not overwritten).

<VirtualHost *:80>
    ServerName {{ apache_server_name | default('localhost') }}
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www/html

    <Directory /var/www/html>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted

        DirectoryIndex index.php index.html
    </Directory>

    # PHP error display (disable in production)
    php_flag  display_errors  off
    php_value error_reporting  E_ALL

    # Security headers
    Header always set X-Content-Type-Options "nosniff"
    Header always set X-Frame-Options "SAMEORIGIN"
    Header always set X-XSS-Protection "1; mode=block"

    # Hide Apache version
    ServerTokens Prod
    ServerSignature Off

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

