Advertisement
Samanta_Moen

Untitled

Oct 26th, 2023 (edited)
751
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 2.42 KB | None | 0 0
  1. user nginx;
  2. worker_processes auto;
  3. error_log /var/log/nginx/error.log;
  4. pid /var/run/nginx.pid;
  5.  
  6. events
  7. {
  8.     worker_connections 1024;
  9. }
  10.  
  11. http
  12. {
  13.     include /etc/nginx/mime.types;
  14.     default_type application/octet-stream;
  15.  
  16.     log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  17.     '$status $body_bytes_sent "$http_referer" '
  18.     '"$http_user_agent" "$http_x_forwarded_for"';
  19.  
  20.     access_log /var/log/nginx/access.log main;
  21.  
  22.     sendfile on;
  23.     keepalive_timeout 65;
  24.  
  25.     server
  26.     {
  27.         listen 8190;
  28.         server_name 192.168.166.66;
  29.  
  30.         location /kapis/terminal.kubesphere.io/
  31.         {
  32.             proxy_pass http://192.168.162.36:30880/kapis/terminal.kubesphere.io/;
  33.             proxy_http_version 1.1;
  34.             proxy_set_header Upgrade $http_upgrade;
  35.             proxy_set_header Connection "upgrade";
  36.             proxy_read_timeout 86400;
  37.         }
  38.         location /kapis/resources.kubesphere.io/v1alpha2/users/admin/kubectl
  39.         {
  40.             proxy_pass http://192.168.162.36:30880/kapis/resources.kubesphere.io/v1alpha2/users/admin/kubectl;
  41.             proxy_set_header X-Real-IP $remote_addr;
  42.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  43.             proxy_set_header REMOTE-HOST $remote_addr;
  44.             add_header X-Cache $upstream_cache_status;
  45.         }
  46.         location /dist/
  47.         {
  48.             proxy_pass http://192.168.162.36:30880/dist/;
  49.             proxy_set_header X-Real-IP $remote_addr;
  50.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  51.             proxy_set_header REMOTE-HOST $remote_addr;
  52.             add_header X-Cache $upstream_cache_status;
  53.         }
  54.         location /api/v1/
  55.         {
  56.             proxy_pass http://192.168.162.36:30880/api/v1/;
  57.             proxy_set_header X-Real-IP $remote_addr;
  58.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  59.             proxy_set_header REMOTE-HOST $remote_addr;
  60.             add_header X-Cache $upstream_cache_status;
  61.         }
  62.  
  63.         location /terminal/
  64.         {
  65.             proxy_pass http://192.168.162.36:30880/terminal/;
  66.             proxy_set_header X-Real-IP $remote_addr;
  67.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  68.             proxy_set_header REMOTE-HOST $remote_addr;
  69.             add_header X-Cache $upstream_cache_status;
  70.         }
  71.  
  72.         # ...其他配置...
  73.     }
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement