This commit is contained in:
2022-04-18 11:21:20 +08:00
commit 45a7af638f
210 changed files with 8997 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
# 部署单节点 nginx-php
- 根据实际环境修改
- docker-compose.yml
- nginx/http.d/80.conf
- 创建目录
```
grep '\<source:' docker-compose.yml | cut -d: -f2 | xargs mkdir -p
```
- 上传可能需要的前端文件到 nginx/html/ 下
- 启动
```
docker-compose up -d
```

View File

@@ -0,0 +1,25 @@
version: "3.7"
services:
nginx-php:
image: harbor.colben.cn/general/nginx-php
container_name: nginx-php
restart: "on-failure"
stop_grace_period: 5m
privileged: true
ports:
- 80:80
volumes:
- type: bind
source: ./nginx/html
target: /var/lib/nginx/html
- type: bind
source: ./nginx/http.d
target: /etc/nginx/http.d
- type: bind
source: ./nginx/log
target: /var/log/nginx
- type: bind
source: ./php7/log
target: /var/log/php7

View File

@@ -0,0 +1,25 @@
server {
listen 80;
location /xxxx/ {}
location ~ ^/xxxx/.+\.php$ {
client_max_body_size 1024m;
client_body_buffer_size 1024m;
fastcgi_buffer_size 256k;
fastcgi_buffers 8 256k;
fastcgi_busy_buffers_size 512k;
fastcgi_temp_file_write_size 512k;
expires -1s;
include fastcgi_params;
try_files $uri =404;
fastcgi_pass unix:/var/lib/php7/phpfpm.sock;
fastcgi_index index.php;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
break;
}
location / {
return 403;
}
}