HEX
Server: nginx/1.18.0
System: Linux ip-172-31-28-230 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.2.26
Disabled: NONE
Upload Files
File: /var/lib/letsencrypt/backups/1735633240.0834694/earthpayments.com.conf_8
server {
    # Server Name
    server_name earthpayments.com;

    # Root Directory
    root /var/www/html/earthpayments.com;
    index index.php index.html index.htm;

    # Access and Error Logs
    access_log /var/log/nginx/earthpayments_access.log;
    error_log /var/log/nginx/earthpayments_error.log;

    # Enabling Gzip Compression
    gzip on;
    gzip_types text/css application/javascript image/svg+xml application/rss+xml text/plain text/xml application/xml application/json application/ld+json font/woff2;
    gzip_min_length 1000;

    # Prevent Access to Hidden Files
    location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;
    }

    # Deny Access to WordPress Config
    location ~* wp-config.php {
        deny all;
    }

    # Deny Access to XMLRPC
    location ~* xmlrpc\.php {
        deny all;
        log_not_found off;
        access_log off;
    }

    # Allow Access to Favicon and Robots.txt
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }

    # Static Files Optimization
    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|webp|woff|woff2|ttf|otf|eot|ttc|mp4|mp3|mov|ogg|webm|avi|wmv|m4a|pdf|doc|xls|ppt|txt|zip|tar|gz|rar|bz2|7z|iso|dmg|tgz|xml|ttf)$ {
        expires max;
        log_not_found off;
    }

    # WordPress Permalinks
    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    # PHP-FPM Configuration
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_pass unix:/run/php/php8.2-fpm.sock; # Update PHP version if necessary
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 4 256k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
    }

    # Secure WordPress Uploads Directory
    location ~* /wp-content/uploads/.*\.php$ {
        deny all;
	}


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/earthpayments.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/earthpayments.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}
server {
    if ($host = earthpayments.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    server_name earthpayments.com;
    listen 80;
    return 404; # managed by Certbot


}