You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.4 KiB

LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule headers_module modules/mod_headers.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule dir_module modules/mod_dir.so
PidFile "/usr/local/apache2/logs/httpd.pid"
ErrorLog "/proc/self/fd/2"
CustomLog "/proc/self/fd/1" common
LogLevel info
Listen ${PORT}
ServerName localhost
DocumentRoot "/usr/local/apache2/htdocs"
DirectoryIndex index.html
User daemon
Group daemon
RewriteEngine On
RewriteRule ^/healthz$ /healthz.json [L]
<Directory "/usr/local/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
RewriteEngine On
# Allow direct access to index.html and existing files
RewriteRule ^index\.html$ - [L]
# If file exists, serve it
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]
# If directory exists, serve it (DirectoryIndex will handle it)
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
# Otherwise, serve 200.html for SPA routing
RewriteRule . /200.html [L]
</Directory>
<Location "/healthz.json">
Header set Content-Type "application/json"
Header set Cache-Control "public, max-age=5"
</Location>
<IfModule mod_headers.c>
Header set Service-Worker-Allowed "/"
</IfModule>