26 lines
512 B
Markdown
26 lines
512 B
Markdown
---
|
||
title: nginx+php上传文件配置
|
||
createTime: 2021/09/25
|
||
tags:
|
||
- linux
|
||
---
|
||
|
||
- 设置`php.ini`
|
||
|
||
主要把包括的选项有:`post_max_size`、`upload_max_filesize`、`memory_limit`、`max_execution_time`等
|
||
|
||
- 设置`nginx.conf`
|
||
|
||
主要是`client_max_body_size`,注意设置`sendfile on`
|
||
|
||
- nginx 一定程度上避免 502
|
||
|
||
```ini
|
||
location / {
|
||
......
|
||
proxy_connect_timeout 300;
|
||
proxy_send_timeout 300;
|
||
proxy_read_timeout 300;
|
||
}
|
||
```
|