66 lines
1.8 KiB
ApacheConf
66 lines
1.8 KiB
ApacheConf
# ZitiNexus Router Enrollment UI - Apache Configuration
|
|
# Simplified configuration to ensure assets load correctly
|
|
|
|
RewriteEngine On
|
|
|
|
# Serve assets directly - NO rewriting for assets
|
|
RewriteRule ^assets/ - [L]
|
|
|
|
# Default page redirect
|
|
RewriteRule ^$ index.php [L]
|
|
|
|
# Security: Deny access to sensitive directories
|
|
<Files "*.php">
|
|
<RequireAll>
|
|
Require all granted
|
|
</RequireAll>
|
|
</Files>
|
|
|
|
<Directory "includes">
|
|
Require all denied
|
|
</Directory>
|
|
|
|
<Directory "logs">
|
|
Require all denied
|
|
</Directory>
|
|
|
|
<Directory "temp">
|
|
Require all denied
|
|
</Directory>
|
|
|
|
# Set proper MIME types for assets
|
|
<IfModule mod_mime.c>
|
|
AddType text/css .css
|
|
AddType application/javascript .js
|
|
AddType image/png .png
|
|
AddType image/jpeg .jpg .jpeg
|
|
AddType image/gif .gif
|
|
AddType image/svg+xml .svg
|
|
AddType image/x-icon .ico
|
|
</IfModule>
|
|
|
|
# Enable compression for text files
|
|
<IfModule mod_deflate.c>
|
|
AddOutputFilterByType DEFLATE text/plain
|
|
AddOutputFilterByType DEFLATE text/html
|
|
AddOutputFilterByType DEFLATE text/xml
|
|
AddOutputFilterByType DEFLATE text/css
|
|
AddOutputFilterByType DEFLATE application/xml
|
|
AddOutputFilterByType DEFLATE application/xhtml+xml
|
|
AddOutputFilterByType DEFLATE application/rss+xml
|
|
AddOutputFilterByType DEFLATE application/javascript
|
|
AddOutputFilterByType DEFLATE application/x-javascript
|
|
</IfModule>
|
|
|
|
# Set cache headers for static assets
|
|
<IfModule mod_expires.c>
|
|
ExpiresActive On
|
|
ExpiresByType text/css "access plus 1 month"
|
|
ExpiresByType application/javascript "access plus 1 month"
|
|
ExpiresByType image/png "access plus 1 month"
|
|
ExpiresByType image/jpeg "access plus 1 month"
|
|
ExpiresByType image/gif "access plus 1 month"
|
|
ExpiresByType image/svg+xml "access plus 1 month"
|
|
ExpiresByType image/x-icon "access plus 1 year"
|
|
</IfModule>
|