# Nginx configuration untuk Retribusi Frontend # Copy ke /etc/nginx/sites-available/retribusi atau include di nginx.conf server { listen 80; server_name retribusi.btekno.cloud; # Redirect HTTP ke HTTPS (jika ada SSL) # return 301 https://$server_name$request_uri; root /www/wwwroot/retribusi.btekno.cloud/retribusi; index index.php index.html; # Logging access_log /var/log/nginx/retribusi_access.log; error_log /var/log/nginx/retribusi_error.log; # Security headers add_header X-Frame-Options "SAMEORIGIN" always; add_header X-XSS-Protection "1; mode=block" always; add_header X-Content-Type-Options "nosniff" always; # Static files location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot)$ { expires 1y; add_header Cache-Control "public, immutable"; access_log off; } # Clean URLs (opsional - uncomment jika diperlukan) # location /dashboard { # try_files $uri $uri/ /public/dashboard/dashboard.html; # } # location /event { # try_files $uri $uri/ /public/dashboard/event.html; # } # location /settings { # try_files $uri $uri/ /public/dashboard/settings.html; # } # PHP files location ~ \.php$ { fastcgi_pass unix:/var/run/php/php8.2-fpm.sock; # Sesuaikan versi PHP fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # Default location location / { try_files $uri $uri/ /index.php?$query_string; } # Deny access to hidden files location ~ /\. { deny all; access_log off; log_not_found off; } } # HTTPS configuration (jika ada SSL) # server { # listen 443 ssl http2; # server_name retribusi.btekno.cloud; # # ssl_certificate /path/to/cert.pem; # ssl_certificate_key /path/to/key.pem; # # # ... (sama seperti konfigurasi di atas) # }