File: //etc/nginx/sites-enabled/aquacity.com.pl
server {
server_name aquacity.com.pl www.aquacity.com.pl;
root /var/www/aquacity.com.pl;
index index.php index.html;
access_log /var/log/nginx/aquacity.com.pl-access.log;
error_log /var/log/nginx/aquacity.com.pl-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;
}
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/aquacity.com.pl/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/aquacity.com.pl/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 = www.aquacity.com.pl) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = aquacity.com.pl) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name aquacity.com.pl www.aquacity.com.pl;
return 404; # managed by Certbot
}