修改配置文件
This commit is contained in:
parent
ad20c63e55
commit
7c146afbfc
@ -2,4 +2,3 @@ FROM nginx:1.23.2
|
|||||||
COPY public/ /usr/share/nginx/html/deploy/
|
COPY public/ /usr/share/nginx/html/deploy/
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
COPY conf.d/ /etc/nginx/conf.d/
|
COPY conf.d/ /etc/nginx/conf.d/
|
||||||
COPY cert/ /usr/local/nginx/cert/
|
|
||||||
|
|||||||
@ -6,10 +6,11 @@ server {
|
|||||||
#access_log /var/log/nginx/host.access.log main;
|
#access_log /var/log/nginx/host.access.log main;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /usr/share/nginx/html/dist;
|
#网站主页路径。此路径仅供参考,具体请您按照实际目录操作。
|
||||||
|
#例如,您的网站主页在 Nginx 服务器的 /etc/www 目录下,则请修改 root 后面的 html 为 /etc/www。
|
||||||
|
root /usr/share/nginx/html/deploy;
|
||||||
index index.html index.htm;
|
index index.html index.htm;
|
||||||
}
|
}
|
||||||
|
|
||||||
#error_page 404 /404.html;
|
#error_page 404 /404.html;
|
||||||
|
|
||||||
# redirect server error pages to the static page /50x.html
|
# redirect server error pages to the static page /50x.html
|
||||||
@ -19,13 +20,6 @@ server {
|
|||||||
# root /usr/share/nginx/html;
|
# root /usr/share/nginx/html;
|
||||||
#}
|
#}
|
||||||
|
|
||||||
location /api {
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header REMOTE-HOST $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_pass http://120.46.194.61:7274/api;
|
|
||||||
}
|
|
||||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
||||||
#
|
#
|
||||||
#location ~ \.php$ {
|
#location ~ \.php$ {
|
||||||
@ -50,14 +44,3 @@ server {
|
|||||||
#}
|
#}
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
location / {
|
|
||||||
#网站主页路径。此路径仅供参考,具体请您按照实际目录操作。
|
|
||||||
#例如,您的网站主页在 Nginx 服务器的 /etc/www 目录下,则请修改 root 后面的 html 为 /etc/www。
|
|
||||||
root /usr/share/nginx/html/deploy;
|
|
||||||
index index.html index.htm;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user