# Custom Apache configuration for Docker environment

# Change default DocumentRoot
DocumentRoot "/var/www/html3"

# Directory permissions for the new DocumentRoot
<Directory "/var/www/html3">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
</Directory>

# Server configuration
ServerName localhost
ServerAdmin admin@media-trust.com
ServerTokens Prod
ServerSignature Off

# Timeout (matching original httpd.conf)
Timeout 300

# Default charset
AddDefaultCharset UTF-8

# Enable sendfile
EnableSendfile on

# PHP エラー表示設定 (開発環境用)
php_flag display_errors on
php_flag display_startup_errors on
php_value error_reporting "E_ALL"
php_flag log_errors on

# Apache エラーページのカスタマイズ
ErrorDocument 500 "<!DOCTYPE html><html><head><title>500 Internal Server Error</title></head><body><h1>500 Internal Server Error</h1><p>詳細なエラー情報についてはログを確認してください。</p><p><a href='/test.php'>テストページ</a> | <a href='/phpinfo.php'>PHP情報</a></p></body></html>"

# Let's Encrypt HTTP-01 challenge (serve for all vhosts)
Alias /.well-known/acme-challenge "/var/www/html3/.well-known/acme-challenge"
<Directory "/var/www/html3/.well-known/acme-challenge">
    Options None
    AllowOverride None
    Require all granted
</Directory>
