# plrk.dev - Generated by NginxForge # Preset: PHP-FPM # Generated: 2026-01-20 21:10:48 UTC # HTTP -> HTTPS redirect server { listen 80; listen [::]:80; server_name plrk.dev; location /.well-known/acme-challenge/ { root /var/www/certbot; allow all; } location / { return 301 https://$host$request_uri; } } server { listen 443 ssl http2; listen [::]:443 ssl http2; ssl_certificate /etc/letsencrypt/live/plrk.dev/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/plrk.dev/privkey.pem; ssl_session_timeout 1d; ssl_session_cache shared:SSL:50m; ssl_session_tickets off; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384; ssl_prefer_server_ciphers off; add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always; server_name plrk.dev; root /var/www/plrk.dev; index index.html index.htm index.php; server_tokens off; # 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; add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header Content-Security-Policy "upgrade-insecure-requests" always; # Allowed methods if ($request_method !~ ^(GET|POST|HEAD)$) { return 405; } # Gzip compression gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_min_length 1000; gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy text/xml; client_max_body_size 64m; # PHP-FPM configuration location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/run/php/php8.3-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; include fastcgi_params; fastcgi_connect_timeout 60s; fastcgi_send_timeout 60s; fastcgi_read_timeout 60s; fastcgi_buffer_size 4k; fastcgi_buffers 8 4k; } # Static file caching location ~* \.(jpg|jpeg|png|gif|ico|webp|svg|woff|woff2|ttf|eot|otf)$ { expires 30d; add_header Cache-Control "public, immutable"; access_log off; log_not_found off; } location ~* \.(css|js)$ { expires 30d; add_header Cache-Control "public, immutable"; access_log off; } location ~* \.(pdf|doc|docx|xls|xlsx|zip|rar|gz|tar)$ { expires 7d; add_header Cache-Control "public"; } # Deny access to hidden files location ~ /\. { deny all; access_log off; log_not_found off; } access_log /var/log/nginx/plrk.dev.access.log; error_log /var/log/nginx/plrk.dev.error.log; }