Update nginx-sample.conf

This commit is contained in:
slawkens 2023-03-06 08:27:26 +01:00
parent 92569b7965
commit 289f82ad23

View File

@ -4,15 +4,21 @@ server {
index index.php; index index.php;
server_name your-domain.com; server_name your-domain.com;
# increase max file upload
client_max_body_size 10M;
# this is very important, be sure its in your nginx conf - it prevents access to logs etc.
location ~ /system { location ~ /system {
deny all; deny all;
return 404; return 404;
} }
# block .htaccess
location ~ /\.ht { location ~ /\.ht {
deny all; deny all;
} }
# block git files and folders
location ~ /\.git { location ~ /\.git {
return 404; return 404;
deny all; deny all;
@ -25,6 +31,7 @@ server {
location ~ \.php$ { location ~ \.php$ {
include snippets/fastcgi-php.conf; include snippets/fastcgi-php.conf;
fastcgi_read_timeout 240; fastcgi_read_timeout 240;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
# for ubuntu 22.04+ it will be php8.1-fpm.-sock
} }
} }