50 lines
1.2 KiB
ApacheConf
50 lines
1.2 KiB
ApacheConf
# =============================================
|
|
# WebGIS — .htaccess (Root)
|
|
# Kompatibel dengan InfinityFree / Apache
|
|
# =============================================
|
|
|
|
# Set halaman index
|
|
DirectoryIndex index.html index.php
|
|
|
|
# Blokir akses ke file sensitif
|
|
<Files ".env">
|
|
Order allow,deny
|
|
Deny from all
|
|
</Files>
|
|
|
|
<Files "env_loader.php">
|
|
Order allow,deny
|
|
Deny from all
|
|
</Files>
|
|
|
|
<Files "db_connect.php">
|
|
Order allow,deny
|
|
Deny from all
|
|
</Files>
|
|
|
|
# Blokir akses ke file .sql
|
|
<FilesMatch "\.sql$">
|
|
Order allow,deny
|
|
Deny from all
|
|
</FilesMatch>
|
|
|
|
# Blokir akses ke file .gitignore dan .git
|
|
<FilesMatch "^\.(git|gitignore|env)">
|
|
Order allow,deny
|
|
Deny from all
|
|
</FilesMatch>
|
|
|
|
# Aktifkan kompres GZIP untuk performa
|
|
<IfModule mod_deflate.c>
|
|
AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json
|
|
</IfModule>
|
|
|
|
# Cache statis untuk performa
|
|
<IfModule mod_expires.c>
|
|
ExpiresActive On
|
|
ExpiresByType text/css "access plus 1 week"
|
|
ExpiresByType application/javascript "access plus 1 week"
|
|
ExpiresByType image/png "access plus 1 month"
|
|
ExpiresByType image/jpeg "access plus 1 month"
|
|
</IfModule>
|