File: //etc/nginx/sites-enabled/animals-voice.com
server {
listen 80;
listen [::]:80;
server_name animals-voice.com www.animals-voice.com;
root /var/www/animals-voice.com;
index index.php index.html;
access_log /var/log/nginx/animals-voice.com-access.log;
error_log /var/log/nginx/animals-voice.com-error.log;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$args;
}
include snippets/wordpress-security.conf;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires max;
log_not_found off;
}
}