server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name domeen.net;
ssl_certificate /etc/letsencrypt/live/domeen.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domeen.net/privkey.pem;
access_log /home/iffi/domeen.net/logs/access.log;
error_log /home/iffi/domeen.net/logs/error.log;
root /home/iffi/domeen.net/public/;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name
www.domeen.net;
ssl_certificate /etc/letsencrypt/live/domeen.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domeen.net/privkey.pem;
return 301 https://domeen.net$request_uri;
}
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name domeen.net
www.domeen.net;
return 301 https://domeen.net$request_uri;
}