server {
listen <PORT>;
root <PATH>/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
imclude snippets/fastcgi-php.conf;
fascgi_pass unix:/run/php/php<VERSION>-fpm.sock;
fastcgi_param SCRIPT_FILENAME $codument_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
sudo gpasswd -a www-data <username>