user root; worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format weblog '{"@timestamp":"$time_iso8601",' '"client_ip":"$remote_addr",' '"size":$body_bytes_sent,' '"responsetime":$request_time,' '"upstreamtime":"$upstream_response_time",' '"upstreamhost":"$upstream_addr",' '"http_host":"$host",' '"method":"$request_method",' '"request_uri":"$request_uri",' '"xff":"$http_x_forwarded_for",' '"referrer":"$http_referer",' '"agent":"$http_user_agent",' '"uri":"$uri",' '"request_body":"$request_body",' '"status":"$status"}'; access_log /var/log/nginx/access-web.log weblog; sendfile on; autoindex_localtime on; charset utf-8; keepalive_timeout 65; gzip on; gzip_http_version 1.0; gzip_disable "MSIE [1-6]."; gzip_types text/plain application/javascript application/json application/x-javascript text/css text/javascript; client_max_body_size 100m; #rms地图 map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { # listen 80; listen 443 ssl; ssl_certificate /etc/nginx/ssl/geekplus.com.pem; ssl_certificate_key /etc/nginx/ssl/geekplus.com.key; # ssl_trusted_certificate /etc/nginx/ssl/Cloudflare_CA.pem; server_name warehouse.geekplus.com; autoindex on; ### 安全加固 开始 ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:ECDHE-RSA-AES128-GCM-SHA256; ssl_prefer_server_ciphers on; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; ### 安全加固 结束 error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } #首页登录直接跳转到登录页面吧 location / { rewrite ^/$ /static/html/login.html permanent ; } ## websockt ssl 配置 location /ws { proxy_pass http://127.0.0.1:8084/ws/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } #rf apk包下载 location /rfapk { alias /usr/local/geekplus/rfapk/; } ##前端静态配置 ##默认拣选前端 location /static { alias /usr/local/geekplus/wwwroot/static/build/ ; } #4.0以后的拣选前端(主要是全仓自营仓) location /static/wms { alias /usr/local/geekplus/wwwroot/static/sea-fe-build/; } #apollo的前端 location /static/apollo { alias /usr/local/geekplus/wwwroot/static/build/ ; } #拣选复核前端 location /static/demeter { alias /usr/local/geekplus/wwwroot/static/demeter-fe-build/; } #拣选收货前端 location /static/persephone { alias /usr/local/geekplus/wwwroot/static/persephone-fe-build/; } #VIP项目的小工具 location /static/vip_tools { alias /usr/local/geekplus/wwwroot/static/vip_tools_build/ ; } #拣选的wms小工具 location /static/wms_tools { alias /usr/local/geekplus/wwwroot/static/wms_tools_build/ ; } #rms程序的前端 location /static/rms { alias /usr/local/geekplus/wwwroot/static/rms_build/ ; } #分拣的前端 location /static/mantis { alias /usr/local/geekplus/wwwroot/static/mantis_build/ ; } #分拣权限前端 location /static/mantis-auth { alias /usr/local/geekplus/wwwroot/static/mantis-auth-build/ ; } #图片展示目录 location /static/pic { alias /usr/local/geekplus/wwwroot/static/pic/ ; } #搬运ark的前端 location /static/ark { alias /usr/local/geekplus/wwwroot/static/ark_build/ ; } #叉车系统avalon的前端 location /static/avalon { alias /usr/local/geekplus/wwwroot/static/avalon_build/ ; } #api的前端 location /static/artemisfe { alias /usr/local/geekplus/wwwroot/static/api_build/ ; } #SIMP前端 location /static/wsmp { alias /usr/local/geekplus/wwwroot/static/wsmp_build/; } #搬运权限管理前端 location /static/auth-manage { alias /usr/local/geekplus/wwwroot/static/auth-manage-build/ ; } #DMP应用平台层前端 location /static/venus { alias /usr/local/geekplus/wwwroot/static/venus-fe-build; } #报表前端 location /static/datas { alias /usr/local/geekplus/wwwroot/static/datas_build/ ; } #ems效率管理平台前端 location /ems { alias /usr/local/geekplus/wwwroot/static/ems_build/ ; } # wmsqs-fe前端自动化测试程序 location /static/autotest-wmsqs-fe { alias /usr/local/geekplus/wwwroot/static/autotest-wmsqs-build/ ; } #wes 的前端 location /static/wes { alias /usr/local/geekplus/wwwroot/static/build-wes/; } location /static/wes/wms{ alias /usr/local/geekplus/wwwroot/static/sea-fe-build-wes/; } location /static/wes/apollo { alias /usr/local/geekplus/wwwroot/static/build-wes/; } #gles前端 location /static/gles { alias /usr/local/geekplus/wwwroot/static/build-gles/; } ###后端代理 #拣选wms的后端 location /beetle/ { proxy_pass http://127.0.0.1:8080/beetle/; proxy_read_timeout 500; proxy_cookie_path /beetle /beetle; } #拣选wms的后端 location /apollo-station/ { proxy_pass http://127.0.0.1:8080/apollo-station/; proxy_cookie_path /apollo-station /apollo-station; } #工作站执行系统WES后端 location /leto-wes/ { proxy_pass http://127.0.0.1:8080/beetle/; proxy_cookie_path /beetle /leto-wes; proxy_read_timeout 120; } location /metis/socket { proxy_pass http://127.0.0.1:8705/metis/socket; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } #拣选wms的后端 location /apollo-task/ { proxy_pass http://127.0.0.1:8080/apollo-task/; } #rms的后端 location /athena/ { proxy_pass http://127.0.0.1:8081/athena/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #api的后端 location /geekplus/ { proxy_pass http://127.0.0.1:8082/geekplus/; } #搬运项目rhino的后端 location /rhino-station/ { proxy_pass http://127.0.0.1:8085/rhino-station/; } #搬运项目rhino的后端 location /rhino-web/ { proxy_pass http://127.0.0.1:8085/rhino-web/; } #搬运ark的后端 location /ark-web/ { proxy_pass http://127.0.0.1:8089/ark-web/; } location /ark-web/webServices/ { proxy_set_header Host $host:$server_port; proxy_pass http://127.0.0.1:8089/ark-web/webServices/; } #叉车系统(avalon)的后端 location /avalon-web/ { proxy_pass http://127.0.0.1:8666/avalon-web/; } #搬运mars的后端 location /mars/ { proxy_pass http://127.0.0.1:8086/mars/; } #搬运权限认证后端 location /auth-manage/ { proxy_pass http://127.0.0.1:8087/auth-manage/; } ##分拣系统后台 location /mantis/ { proxy_pass http://127.0.0.1:8091/mantis/ ; } ##分拣权限系统后台 location /mantis-auth/ { proxy_pass http://127.0.0.1:8092/mantis-auth/ ; } #ems效率管理平台后端 location /metis/ { proxy_pass http://127.0.0.1:8705/metis/; } #gles后端 location /gles-server/ { proxy_pass http://127.0.0.1:8601/gles-server/; } location /apollo/ws/ { proxy_pass http://127.0.0.1:8080/leto/; proxy_cookie_path /leto /apollo/ws; proxy_read_timeout 120; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } location /static/nuwa/upload/ { try_files $uri /static/nuwa/index.html; proxy_set_header Remoteip $remote_addr; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; alias /data/nfs-bind/online-online-6804-pvc-6ac9ca14-1f28-4eb0-9953-29ccee0673cb/upload/; } location /static/nuwa/download/data/ { try_files $uri /static/nuwa/index.html; proxy_set_header Remoteip $remote_addr; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; alias /data/nfs-bind/online-online-6804-pvc-6ac9ca14-1f28-4eb0-9953-29ccee0673cb/download/data/; } #SIMP后端######### location /geekplus-wsmp/ { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_connect_timeout 600s; proxy_send_timeout 1800s; proxy_read_timeout 1800s; proxy_http_version 1.1; client_max_body_size 2048m; client_body_buffer_size 256k; proxy_pass http://127.0.0.1:8700/geekplus-wsmp/; } #应用平台层后端 location /venus { proxy_pass http://127.0.0.1:17003/venus/; } #全仓复核打包程序后端 location /beetle/demeter/ { proxy_pass http://127.0.0.1:8094/demeter/; proxy_cookie_path /demeter /beetle/demeter; proxy_read_timeout 360; } #全仓复核打包程序后端 location /beetle/persephone/ { proxy_pass http://127.0.0.1:8093/persephone-access/; proxy_cookie_path /persephone-access /beetle/persephone; } #venus内存小工具 location /venus/tools/ { proxy_pass http://127.0.0.1:17303/; } location /venus/v3 { proxy_pass http://127.0.0.1:17303/venus; } #工具类 location /wms_tools/ { proxy_pass http://127.0.0.1:9022/; } #拣选小工具后端 location /wms_tools_java/ { proxy_pass http://127.0.0.1:8083/wms_tools/; } #报表后端 location /epimetheus/ { proxy_pass http://127.0.0.1:8088/epimetheus/; } ##日志下载 location /log { alias /var/log/geekplus/; } ##数据库备份文件下载 location /databackup { alias /usr/local/geekplus/backup/mysql_data/day/; } ##数据库binlog文件下载 location /databinlog { alias /usr/local/geekplus/data/mysql/; } location /weblog/ { proxy_pass http://127.0.0.1:83/ ; access_log /var/log/nginx/weblog.log weblog; } #rms前端WEBSCOKET location /athena-monitor { proxy_pass http://127.0.0.1:8890/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } #sip实施工具 location /siptool/{ proxy_pass http://127.0.0.1:8710/siptool/; proxy_connect_timeout 60s; proxy_send_timeout 300s; proxy_read_timeout 300s; } # WMS工作站 location /station-websocket { proxy_pass http://127.0.0.1:8889/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_connect_timeout 60s; proxy_send_timeout 28800s; proxy_read_timeout 28800s; } # 电子标签 location /glowworm-websocket { proxy_pass http://127.0.0.1:8892/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_connect_timeout 60s; proxy_send_timeout 28800s; proxy_read_timeout 28800s; } #ark location /ark-station-webSocket { proxy_pass http://127.0.0.1:8089/ark-web/slamApp; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_connect_timeout 60s; proxy_send_timeout 28800s; proxy_read_timeout 28800s; } # websocket通道 location /mantis-ws { proxy_pass http://127.0.0.1:25000/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } ##临时目录 location /tmp { alias /tmp; } location /static/nuwa { try_files $uri /static/nuwa/index.html; alias /usr/local/geekplus/wwwroot/static/build-nuwa-fe; } location /static/nuwa/static/ { proxy_pass http://localhost:8400/static/; proxy_set_header Remoteip $remote_addr; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location /nuwa/api/ { proxy_pass http://localhost:8400/api/; proxy_set_header Remoteip $remote_addr; proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } } server { listen 83; server_name localhost; location / { default_type application/json; return 200 '{"code":"0","msg":"ok"}'; } } }