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