File: /var/lib/letsencrypt/backups/1758727648.5690002/rocioprime.conf_18
server {
server_name rocioprime.com;
root /var/www/rocioprime;
access_log /var/log/nginx/rocioprime.log;
error_log /var/log/nginx/rocioprime-error.log error;
index index.html index.htm index.php;
# Prevent caching for login and admin pages
set $no_cache 0;
if ($request_uri ~* "/wp-login.php|/wp-admin/") {
set $no_cache 1;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
# FastCGI Cache Settings
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 301 302 1h;
fastcgi_cache_use_stale error timeout invalid_header http_500;
fastcgi_cache_min_uses 1;
fastcgi_ignore_headers Cache-Control Expires Set-Cookie;
add_header X-FastCGI-Cache $upstream_cache_status;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/rocioprime.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/rocioprime.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 = rocioprime.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name rocioprime.com;
listen 80;
return 404; # managed by Certbot
}