myaac/nginx-sample.conf
2023-02-14 23:22:17 +01:00

31 lines
574 B
Plaintext

server {
listen 80;
root /home/otserv/www/public;
index index.php;
server_name your-domain.com;
# increase max file upload
client_max_body_size 10M;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_read_timeout 240;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
# for ubuntu 22.04+ it will be php8.1-sock
}
location ~ /\.ht {
deny all;
}
# this is very important, be sure its in your nginx conf - it prevents access to logs etc.
location /system {
deny all;
return 404;
}
}