forked from Ym0T/pterodactyl-nginx-egg
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.conf
More file actions
74 lines (61 loc) · 1.79 KB
/
Copy pathdefault.conf
File metadata and controls
74 lines (61 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
server {
listen 80;
server_name "";
access_log /home/container/logs/naccess.log;
error_log /home/container/logs/nerror.log error;
root /home/container/www;
index index.html index.htm index.php;
charset utf-8;
absolute_redirect off;
port_in_redirect off;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
# allow larger file uploads and longer script runtimes
client_max_body_size 100m;
client_body_timeout 120s;
sendfile off;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
try_files $fastcgi_script_name =404;
fastcgi_pass unix:/home/container/tmp/php-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY "";
fastcgi_intercept_errors on;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
}
# Block access to sensitive files and directories
location ~ /\.git {
deny all;
}
location ~ /\.ht {
deny all;
}
location ~ /\.env {
deny all;
}
location ~ /\.svn {
deny all;
}
location ~ /composer\.(json|lock)$ {
deny all;
}
location ~ /package(-lock)?\.json$ {
deny all;
}
location ~ /\.user\.ini$ {
deny all;
}
location ~ /\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)$ {
deny all;
}
}