DockerVonKI/apache/vhost.conf

31 lines
917 B
Plaintext

# Reverse-Proxy auf Node-API (Service-Name "api", Port 8080)
<VirtualHost *:80>
ServerName localhost
# Optionale statische Dateien
DocumentRoot "/usr/local/apache2/htdocs"
<Directory "/usr/local/apache2/htdocs">
Require all granted
Options -Indexes
</Directory>
# Proxy Einstellungen
ProxyPreserveHost On
ProxyPass /api/ http://api:8080/api/
ProxyPassReverse /api/ http://api:8080/api/
# Health passthrough
ProxyPass /health http://api:8080/health
ProxyPassReverse /health http://api:8080/health
# CORS/Headers bei Bedarf
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set X-Forwarded-Proto "http"
RequestHeader set X-Forwarded-Proto "http"
ErrorLog /proc/self/fd/2
CustomLog /proc/self/fd/1 combined
</VirtualHost>