@@ -316,7 +316,7 @@ title: Docker 部署
316
316
317
317
进入 deploy 目录,修改 ` nginx.conf ` 文件
318
318
319
- ``` nginx :collapsed-lines
319
+ ``` nginx
320
320
# For more information on configuration, see:
321
321
# * Official English Documentation: http://nginx.org/en/docs/
322
322
# * Official Russian Documentation: http://nginx.org/ru/docs/
@@ -347,34 +347,40 @@ title: Docker 部署
347
347
gzip_vary on;
348
348
349
349
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
+ #}
350
358
351
359
server {
360
+ # 删除这两行 [!code --:2]
352
361
listen 80 default_server;
353
362
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;
365
363
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;
368
373
369
- client_max_body_size 10m ;
374
+ client_max_body_size 5m ;
370
375
371
- root /www/fba_ui;
376
+ root /var/ www/fba_ui;
372
377
373
378
location / {
374
379
try_files $uri $uri/ /index.html;
375
380
}
376
381
377
382
location /api/v1/ {
383
+ # 更新 fba_server 为 0.0.0.0 [!code warning]
378
384
proxy_pass http://fba_server:8001;
379
385
380
386
proxy_set_header Host $http_host;
@@ -387,16 +393,9 @@ title: Docker 部署
387
393
}
388
394
389
395
location /static/ {
390
- alias /www/fba_server/backend/static;
396
+ alias /var/ www/fba_server/backend/static;
391
397
}
392
398
}
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
- }
400
399
}
401
400
```
402
401
0 commit comments