-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnginx.conf
More file actions
45 lines (35 loc) · 1.08 KB
/
nginx.conf
File metadata and controls
45 lines (35 loc) · 1.08 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
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
alias __INSTALL_DIR__/;
index index.php;
client_max_body_size 50M;
proxy_read_timeout 600s;
try_files $uri $uri/ /index.php$is_args$args;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_read_timeout 900s;
# Buffering to survive heavy requests
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_busy_buffers_size 64k;
}
}
location /plugins/ {
alias __INSTALL_DIR__/plugins/;
# Ensure correct MIME type for PDF.js module files
location ~ \.mjs$ {
types { }
default_type application/javascript;
}
# Security: Do not execute PHP files in plugins directory
location ~ \.php$ {
deny all;
}
}