#SAMPLE NGINX CONF FILE
server {
    listen 80;
    
    # MAKE SURE THE DOCUMENT ROOT IS THE /public IN THE FOLDER WHERE THE DOMAIN POINTS TO (required)
    root        /PATHTODOMAINROOT/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-Content-Type-Options "nosniff";

    index index.php;

    charset utf-8;

    ## SAMPLE REWRITE RULE FOR THE SCRIPT (required)
    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    ## 404 ERROR (optional)
    error_page 404 /index.php;

    ## THIS IS JUST A SAMPLE, IT WILL DEPEND ON YOUR SERVER
    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}