File: //etc/nginx/sites-enabled_24/dev-wedolaundry.conf
server {
# Listen for HTTPS requests
listen 443 ssl;
server_name dev-wedolaundry-wp.dreamstechnologies.com;
# Document root
root /mnt/data/dev/dev-wedolaundry;
index index.php index.html index.htm;
# SSL configuration (SSL handled by Cloudflare)
ssl_certificate /etc/nginx/ssl/stardreams.pem;
ssl_certificate_key /etc/nginx/ssl/stardreams.key;
# Security headers
add_header X-Content-Type-Options "nosniff";
add_header X-XSS-Protection "1; mode=block";
add_header Strict-Transport-Security "max-age=86400; includeSubDomains";
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_busy_buffers_size 64k;
fastcgi_temp_file_write_size 64k;
fastcgi_read_timeout 300;
# PHP-FPM configuration
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Restrict access to sensitive files
location ~ /\.(env|ini|log|sh|sql)$ {
deny all;
}
# Block access to .git directories
location ~ /\.git {
deny all;
}
# General settings for the document root
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Logging
error_log /var/log/nginx/dev-wedolaundry-wp_error.log;
access_log /var/log/nginx/dev-wedolaundry-wp_access.log combined;
}