File: /var/lib/letsencrypt/backups/1758727647.1451154/pausfood.conf_23
server {
server_name pausfood.co.id;
root /var/www/pausfood;
access_log /var/log/nginx/pausefood.log;
error_log /var/log/nginx/pausefood-error.log error;
index 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-pausfood.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/pausfood.co.id/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/pausfood.co.id/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 = pausfood.co.id) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name pausfood.co.id;
return 404; # managed by Certbot
}
server {
if ($host = www.pausfood.co.id) {
return 301 https://pausfood.co.id$request_uri;
} # managed by Certbot
listen 80;
server_name www.pausfood.co.id;
return 404; # managed by Certbot
}