# Adapt paths, PHP socket, hostname and TLS certificate to your server.
server {
    listen 443 ssl;
    server_name www.maatilaagro.com;
    root /srv/maatila-agro/public;
    index index.php;
    ssl_certificate /path/to/fullchain.pem;
    ssl_certificate_key /path/to/privkey.pem;
    client_max_body_size 12m;
    location ~ /\. { deny all; }
    location / { try_files $uri $uri/ =404; }
    location ~ \.php$ {
        try_files $uri =404;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS on;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
    }
}
server {
    listen 80;
    server_name www.maatilaagro.com;
    return 301 https://www.maatilaagro.com$request_uri;
}
