OpenWRT适配于N1的默认可道云配置

编辑生成 php-fpm 的模板

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[global]
pid = |PID|
error_log = |ERROR_LOG|
[www]
user = root
listen = |SOCK|
listen.mode = 0666
listen.allowed_clients = 127.0.0.1
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /

编辑生成 php 的模板

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
[PHP]
zend.ze1_compatibility_mode = Off
engine = On
precision = 12
y2k_compliance = On
output_buffering = Off
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 100

open_basedir = /tmp:|project_directory|:|open_basedir|:/usr/bin/
disable_functions =
disable_classes =
expose_php = On
max_execution_time = 3600
max_input_time = 3600
memory_limit = |memory_limit|
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

display_errors = On
display_startup_errors = Off
log_errors = Off
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
track_errors = Off

variables_order = "EGPCS"
request_order = "GP"
register_globals = Off
register_long_arrays = Off
register_argc_argv = On
auto_globals_jit = On
post_max_size = |upload_max_filesize|
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"

;doc_root = "/www"
user_dir =
extension_dir = "/usr/lib/php8"
enable_dl = On
cgi.fix_pathinfo=1

file_uploads = On
upload_tmp_dir = "/tmp"
upload_max_filesize = |upload_max_filesize|
max_file_uploads = 1000

allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60

编辑生成 nginx 的模板

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
user root root;
worker_processes auto;
pid |PID|;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
sendfile on;
keepalive_timeout 65;
server {
listen |PORT|;
listen [::]:|PORT|;
|ssl_certificate|
|ssl_certificate_key|
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
server_name localhost;
root |project_directory|;
index index.html index.htm index.php;
location ~ \.php(.*)$ {
fastcgi_pass unix:|SOCK|; # 通过 Unix 套接字执行 PHP
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # 修复 Nginx fastcgi 漏洞
fastcgi_param PATH_INFO $fastcgi_path_info;
include /etc/nginx/fastcgi_params;
client_max_body_size |upload_max_filesize|;
client_body_temp_path |temp_path|;
client_body_timeout 3600s;
fastcgi_connect_timeout 3600s;
fastcgi_send_timeout 3600s;
fastcgi_read_timeout 3600s;
}
}
}