Update nginx-sample.conf (#175)

Now we prevent access to system directory and update php version.
This commit is contained in:
anyeor 2021-10-28 21:39:38 +02:00 committed by GitHub
parent fad80307d8
commit 50270f6d6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,25 +1,25 @@
server { server {
listen 80; listen 80;
root /home/otserv/www/public; root /home/otserv/www/public;
index index.php; index index.php;
server_name your-domain.com; server_name your-domain.com;
location ~ /system {
deny all;
return 404;
}
location / { location ~ /\.ht {
try_files $uri $uri/ /index.php; deny all;
} }
location ~ \.php$ { location / {
include snippets/fastcgi-php.conf; try_files $uri $uri/ /index.php;
fastcgi_read_timeout 240; }
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
location ~ /\.ht { location ~ \.php$ {
deny all; include snippets/fastcgi-php.conf;
} fastcgi_read_timeout 240;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
location /system { }
deny all; }
return 404;
}
}