123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- user root;
- worker_processes 5;
- events {
- worker_connections 2048;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- server_tokens off;
- sendfile on;
- keepalive_timeout 65;
- gzip on;
- gzip_disable "msie6";
- gzip_min_length 1k;
- gzip_buffers 4 16k;
- gzip_http_version 1.0;
- gzip_comp_level 3;
- gzip_types text/plain
- application/x-javascript
- ext/css
- application/xml
- text/javascript
- image/jpeg
- image/gif
- image/png
- image/svg+xml
- application/font-woff
- application/javascript;
- gzip_vary on;
- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" "$http_x_forwarded_for"';
- server {
- listen 8181;
- charset utf-8;
- index index.html;
- root /usr/share/nginx/html/;
- location ~ .*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$ {
- expires 7d;
- add_header Pragma public;
- add_header Cache-Control "public, must-revalidate, proxy-revalidate";
- }
- location ${__WEB_CONTEXT_PATH}/ {
- try_files $uri $uri/ /index.html;
- access_log on;
- }
- location ${__WEB_CONTEXT_PATH}/mark-tool/* {
- alias /usr/share/nginx/html/mark-tool/;
- index index.html;
- try_files $uri $uri/ /index.html;
- }
- location /data_images/portal/ {
- proxy_pass ${__GATEWAY_URL}/aiSquare/openApi/appscene/data_images/portal/;
- expires 7d;
- add_header Pragma public;
- add_header Cache-Control "public, must-revalidate, proxy-revalidate";
- }
- location ^~ ${__WEB_CONTEXT_PATH}/assets/ {
- alias /usr/share/nginx/html/assets/;
- expires max;
- add_header Pragma public;
- add_header Cache-Control "public, must-revalidate, proxy-revalidate";
- }
- location ^~ ${__WEB_CONTEXT_PATH}/images/ {
- alias /usr/share/nginx/html/images/;
- add_header Pragma public;
- add_header Cache-Control "public, must-revalidate, proxy-revalidate";
- }
- location ^~ ${__WEB_CONTEXT_PATH}/docs/ {
- alias /usr/share/nginx/html/docs/;
- add_header Pragma public;
- add_header Cache-Control "public, must-revalidate, proxy-revalidate";
- }
- location /aiSquare/openApi/uc/oauth/ {
- proxy_pass ${__GATEWAY_URL}/aiSquare/openApi/uc/oauth/;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
- location /aiSquare/openApi/ {
- proxy_pass ${__GATEWAY_URL}/aiSquare/openApi/;
- proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- }
- error_page 403 404 405 ${__WEB_CONTEXT_PATH}/notFound;
- error_page 500 502 503 504 ${__WEB_CONTEXT_PATH}/error;
- location = ${__WEB_CONTEXT_PATH}/notFound {
- root /usr/share/nginx/html;
- }
- location /aiSquare/logs-temp/ {
- alias /data/ai_lab/ai_web/logs/;
- charset utf-8,gbk;
- autoindex on;
- autoindex_exact_size on;
- autoindex_localtime on;
- }
- access_log /data/ai_lab/ai_web/logs/web-access.log main;
- }
- }
|