备份104ng
This commit is contained in:
parent
b3457fdeb0
commit
f26518cde9
|
|
@ -0,0 +1,110 @@
|
|||
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
server_tokens off;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
#access_log logs/access.log main;
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 65;
|
||||
client_max_body_size 100M;
|
||||
client_body_buffer_size 100M;
|
||||
fastcgi_buffer_size 128k;
|
||||
fastcgi_buffers 8 128k;
|
||||
fastcgi_busy_buffers_size 128k;
|
||||
fastcgi_temp_file_write_size 128k;
|
||||
#gzip on;
|
||||
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
charset utf-8;
|
||||
|
||||
location /h5pro {
|
||||
# 网站根目录,此处使用容器内的路径
|
||||
alias /usr/share/nginx/html/h5pro/;
|
||||
# 默认首页
|
||||
index index.html;
|
||||
# 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html
|
||||
try_files $uri $uri/ /h5pro/index.html;
|
||||
}
|
||||
|
||||
location /h5yz {
|
||||
# 网站根目录,此处使用容器内的路径
|
||||
alias /usr/share/nginx/html/h5yz/;
|
||||
# 默认首页
|
||||
index index.html;
|
||||
# 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html
|
||||
try_files $uri $uri/ /h5yz/index.html;
|
||||
}
|
||||
|
||||
location /glweb {
|
||||
# 网站根目录,此处使用容器内的路径
|
||||
alias /usr/share/nginx/html/glweb/;
|
||||
# 默认首页
|
||||
index index.html;
|
||||
# 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html
|
||||
try_files $uri $uri/ /glweb/index.html;
|
||||
}
|
||||
|
||||
location /gxyzweb {
|
||||
# 网站根目录,此处使用容器内的路径
|
||||
alias /usr/share/nginx/html/gxyzweb/;
|
||||
# 默认首页
|
||||
index index.html;
|
||||
# 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html
|
||||
try_files $uri $uri/ /gxyzweb/index.html;
|
||||
}
|
||||
|
||||
|
||||
location /adScreen {
|
||||
# 网站根目录,此处使用容器内的路径
|
||||
alias /usr/share/nginx/html/adScreen/;
|
||||
# 默认首页
|
||||
index index.html;
|
||||
# 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html
|
||||
try_files $uri $uri/ /adScreen/index.html;
|
||||
}
|
||||
|
||||
location /statics/ {
|
||||
proxy_pass http://10.138.55.104:59300/statics/;
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
|
||||
location /dev-api/ {
|
||||
proxy_pass http://10.138.55.104:58080/; #跨域转发路由地址
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
[root@canteen conf]# pwd
|
||||
/home/lzapp/nginx/conf
|
||||
|
||||
[root@localhost sbin]# docker restart nginx-lzstapp
|
||||
[root@localhost sbin]#
|
||||
|
||||
|
||||
Loading…
Reference in New Issue