diff --git a/scripts_10_138_55_104/nginx.conf b/scripts_10_138_55_104/nginx.conf new file mode 100644 index 00000000..c28a6705 --- /dev/null +++ b/scripts_10_138_55_104/nginx.conf @@ -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; + } + + +} + + +} + diff --git a/scripts_10_138_55_104/readme.txt b/scripts_10_138_55_104/readme.txt new file mode 100644 index 00000000..5c994856 --- /dev/null +++ b/scripts_10_138_55_104/readme.txt @@ -0,0 +1,7 @@ +[root@canteen conf]# pwd +/home/lzapp/nginx/conf + +[root@localhost sbin]# docker restart nginx-lzstapp +[root@localhost sbin]# + +