From 38bed73cbae6094b191527e92bc0ebf65d8f8313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=B9=E5=A6=B9=E4=B8=8B=E9=9B=A8=E5=9B=9E=E4=B8=8D?= =?UTF-8?q?=E5=8E=BB?= Date: Thu, 30 Jun 2022 20:21:47 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9Anginx=E6=97=A5=E5=BF=97=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- nginx.conf | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5731814..10a6288 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN mkdir -p /apps COPY . /apps WORKDIR /apps ## 安装依赖 -RUN npm ci --registry https://registry.npmmirror.com && npm run build +RUN npm i --registry https://registry.npmmirror.com && npm run build # 设置部署镜像 FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:latest diff --git a/nginx.conf b/nginx.conf index d4a5b94..0575c17 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,7 +1,7 @@ # 参考:https://www.likecs.com/ask-1256888.html user root; worker_processes auto; -error_log /var/log/nginx/error.log warn; +error_log /var/log/nginx/error.log error; events { worker_connections 1024; } @@ -9,14 +9,11 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; sendfile off; - access_log off; + access_log on; keepalive_timeout 3000; server { listen 7000; server_name localhost; - #charset koi8-r; - access_log /var/log/nginx/access.log main; - error_log /var/log/nginx/error.log error; ## 静态资源代理 location / { gzip on; #开启或关闭gzip on off