Skip to content

Commit 7fd5a71

Browse files
committed
update docs
1 parent 73257f1 commit 7fd5a71

File tree

1 file changed

+23
-24
lines changed

1 file changed

+23
-24
lines changed

docs/guide/deploy/Docker.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ title: Docker 部署
316316

317317
进入 deploy 目录,修改 `nginx.conf` 文件
318318

319-
```nginx :collapsed-lines
319+
```nginx
320320
# For more information on configuration, see:
321321
# * Official English Documentation: http://nginx.org/en/docs/
322322
# * Official Russian Documentation: http://nginx.org/ru/docs/
@@ -347,34 +347,40 @@ title: Docker 部署
347347
gzip_vary on;
348348
349349
keepalive_timeout 300;
350+
# [!code ++:7]
351+
# server {
352+
# listen 80;
353+
# listen [::]:80;
354+
# # xxx.com 应该与 .env.production 中的配置保持一致
355+
# server_name xxx.com;
356+
# rewrite ^(.*)$ https://$host$1 permanent;
357+
#}
350358
351359
server {
360+
# 删除这两行 [!code --:2]
352361
listen 80 default_server;
353362
listen [::]:80 default_server;
354-
server_name 127.0.0.1;
355-
# [!code ++:9]
356-
listen 443 ssl;
357-
# docker ssl 证书文件路径配置应该与 docker-compose 中的保持一致
358-
# /etc/ssl/xxx.pem:挂载到容器内 ssl pem 证书文件的路径,自行修改
359-
# /etc/ssl/xxx.key:挂载到容器内 ssl key 证书文件的路径,自行修改
360-
ssl_certificate /etc/ssl/xxx.pem;
361-
ssl_certificate_key /etc/ssl/xxx.key;
362-
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
363-
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
364-
ssl_prefer_server_ciphers on;
365363
366-
# xxx.com 应该与 .env.production 中的配置保持一致
367-
server_name xxx.com;
364+
# 更新为与上面 server_name 相同 [!code warning]
365+
server_name 127.0.0.1;
366+
# [!code ++:6]
367+
# listen 443 ssl;
368+
# ssl_certificate /etc/ssl/xxx.pem; # 证书
369+
# ssl_certificate_key /etc/ssl/xxx.key; # 密钥
370+
# ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
371+
# ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
372+
# ssl_prefer_server_ciphers on;
368373
369-
client_max_body_size 10m;
374+
client_max_body_size 5m;
370375
371-
root /www/fba_ui;
376+
root /var/www/fba_ui;
372377
373378
location / {
374379
try_files $uri $uri/ /index.html;
375380
}
376381
377382
location /api/v1/ {
383+
# 更新 fba_server 为 0.0.0.0 [!code warning]
378384
proxy_pass http://fba_server:8001;
379385
380386
proxy_set_header Host $http_host;
@@ -387,16 +393,9 @@ title: Docker 部署
387393
}
388394
389395
location /static/ {
390-
alias /www/fba_server/backend/static;
396+
alias /var/www/fba_server/backend/static;
391397
}
392398
}
393-
# [!code ++:6]
394-
server {
395-
listen 80;
396-
# xxx.com 应该与 .env.production 中的配置保持一致
397-
server_name xxx.com;
398-
rewrite ^(.*)$ https://$host$1 permanent;
399-
}
400399
}
401400
```
402401

0 commit comments

Comments
 (0)