# Konfigurasi Apache untuk aplikasi Catatan Tumbuh Kembang & Hafalan Anak # Menggunakan IP address 103.195.188.162 ServerName 103.195.188.162 # Document root DocumentRoot /var/www/html # Directory configuration for anak frontend AllowOverride All Require all granted # CORS headers Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE" Header set Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" Header set Access-Control-Expose-Headers "Content-Length,Content-Range" # Handle preflight requests for API Header set Access-Control-Allow-Origin "*" Header set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE" Header set Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" Header set Access-Control-Max-Age "1728000" Header set Content-Type "text/plain; charset=utf-8" Header set Content-Length "0" Header always set Access-Control-Allow-Origin "*" Header always set Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE" Header always set Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" # Proxy API requests to backend ProxyPreserveHost On ProxyPass /anak/api/ http://127.0.0.1:3005/api/ ProxyPassReverse /anak/api/ http://127.0.0.1:3005/api/ # Logging ErrorLog ${APACHE_LOG_DIR}/anak_error.log CustomLog ${APACHE_LOG_DIR}/anak_access.log combined