|
| 1 | +user lowcoder; |
| 2 | + |
| 3 | +worker_processes 1; |
| 4 | + |
| 5 | +events { |
| 6 | + worker_connections 1024; |
| 7 | +} |
| 8 | + |
| 9 | +http { |
| 10 | + |
| 11 | + include /etc/nginx/mime.types; |
| 12 | + default_type application/octet-stream; |
| 13 | + |
| 14 | + log_format main '"$time_local" client=$remote_addr ' |
| 15 | + 'method=$request_method request="$request" ' |
| 16 | + 'request_length=$request_length ' |
| 17 | + 'status=$status bytes_sent=$bytes_sent ' |
| 18 | + 'body_bytes_sent=$body_bytes_sent ' |
| 19 | + 'referer=$http_referer ' |
| 20 | + 'http_x_forwarded_for=$http_x_forwarded_for ' |
| 21 | + 'user_agent="$http_user_agent" ' |
| 22 | + 'upstream_addr=$upstream_addr ' |
| 23 | + 'upstream_status=$upstream_status ' |
| 24 | + 'request_time=$request_time ' |
| 25 | + 'upstream_response_time=$upstream_response_time ' |
| 26 | + 'upstream_connect_time=$upstream_connect_time ' |
| 27 | + 'upstream_header_time=$upstream_header_time'; |
| 28 | + |
| 29 | + keepalive_timeout 65; |
| 30 | + sendfile on; |
| 31 | + #tcp_nopush on; |
| 32 | + |
| 33 | + server { |
| 34 | + listen 3443 ssl; |
| 35 | + root /lowcoder/client; |
| 36 | + |
| 37 | + include /etc/nginx/ssl-certificate.conf; |
| 38 | + include /etc/nginx/ssl-params.conf; |
| 39 | + |
| 40 | + location / { |
| 41 | + try_files $uri /index.html; |
| 42 | + |
| 43 | + if ($request_filename ~* .*.(html|htm)$) { |
| 44 | + add_header Cache-Control no-cache; |
| 45 | + } |
| 46 | + } |
| 47 | + |
| 48 | + location /api { |
| 49 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 50 | + proxy_set_header X-Forwarded-Host $host; |
| 51 | + proxy_set_header X-Real-IP $remote_addr; |
| 52 | + proxy_pass __LOWCODER_API_SERVICE_URL__; |
| 53 | + } |
| 54 | + |
| 55 | + location /node-service/plugin-icons { |
| 56 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 57 | + proxy_set_header X-Forwarded-Host $host; |
| 58 | + proxy_set_header X-Real-IP $remote_addr; |
| 59 | + proxy_pass __LOWCODER_NODE_SERVICE_URL__; |
| 60 | + } |
| 61 | + } |
| 62 | + |
| 63 | +} |
0 commit comments