|
@@ -93,19 +93,100 @@
|
|
|
* 堡垒机域名解析
|
|
|
|
|
|
```nginx
|
|
|
- sssss
|
|
|
- ```
|
|
|
+ server {
|
|
|
+ listen 80;
|
|
|
+ server_name wy.huiguanjia.cn;
|
|
|
+ return 301 https://wy.huiguanjia.cn$request_uri;
|
|
|
+ }
|
|
|
+ server {
|
|
|
+ listen 443;
|
|
|
+ server_name wy.huiguanjia.cn;
|
|
|
+
|
|
|
+ root html;
|
|
|
+ index index.html index.htm index.php;
|
|
|
|
|
|
+ ssl on;
|
|
|
+ ssl_certificate cert/wy.huiguanjia.cn.pem;
|
|
|
+ ssl_certificate_key cert/wy.huiguanjia.cn.key;
|
|
|
+ ssl_session_timeout 5m;
|
|
|
+ ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
|
|
|
+ ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
|
|
+ ssl_prefer_server_ciphers on;
|
|
|
+
|
|
|
|
|
|
+ location / {
|
|
|
+ proxy_pass http://172.16.0.246:3000/;
|
|
|
+
|
|
|
+ #Proxy Settings
|
|
|
+ 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;
|
|
|
+ proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
|
|
+ proxy_max_temp_file_size 0;
|
|
|
+ proxy_connect_timeout 300;
|
|
|
+ proxy_send_timeout 300;
|
|
|
+ proxy_read_timeout 300;
|
|
|
+ proxy_buffer_size 4k;
|
|
|
+ proxy_buffers 4 32k;
|
|
|
+ proxy_busy_buffers_size 64k;
|
|
|
+ proxy_temp_file_write_size 64k;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ ```
|
|
|
+
|
|
|
|
|
|
+
|
|
|
* 转发请求到应用服务器的前端服务
|
|
|
|
|
|
```nginx
|
|
|
- bbb
|
|
|
- ```
|
|
|
+ server {
|
|
|
+ listen 3000;
|
|
|
+ server_name 127.0.0.1;
|
|
|
+
|
|
|
+ root html;
|
|
|
+ index index.html index.htm index.php;
|
|
|
+
|
|
|
|
|
|
+ location / {
|
|
|
+ root /data/bin/hgj2/web_publish/admin/public/;
|
|
|
+ index index.html;
|
|
|
+ try_files $uri $uri/ /index.html;
|
|
|
|
|
|
+ #Proxy Settings
|
|
|
+ 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;
|
|
|
+ proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
|
|
+ proxy_max_temp_file_size 0;
|
|
|
+ proxy_connect_timeout 300;
|
|
|
+ proxy_send_timeout 300;
|
|
|
+ proxy_read_timeout 300;
|
|
|
+ proxy_buffer_size 4k;
|
|
|
+ proxy_buffers 4 32k;
|
|
|
+ proxy_busy_buffers_size 64k;
|
|
|
+ proxy_temp_file_write_size 64k;
|
|
|
+ }
|
|
|
+
|
|
|
+ location /9ad134a361f8d778/ {
|
|
|
+ proxy_pass http://127.0.0.1:8161/;
|
|
|
+ proxy_read_timeout 600;
|
|
|
+ }
|
|
|
+
|
|
|
+ location /ureport/res/ {
|
|
|
+ proxy_pass http://127.0.0.1:8161/ureport/res/;
|
|
|
+ }
|
|
|
+
|
|
|
+ location /ureport/preview/ {
|
|
|
+ proxy_pass http://127.0.0.1:8161/ureport/preview/;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ```
|
|
|
+
|
|
|
|
|
|
+
|
|
|
* 跨域处理,是接口请求同源
|
|
|
|
|
|
```nginx
|