|
|
@@ -0,0 +1,79 @@
|
|
|
+server
|
|
|
+{
|
|
|
+ listen 80;
|
|
|
+ server_name push.rrbrr.com;
|
|
|
+ return 301 https://$server_name$request_uri;
|
|
|
+}
|
|
|
+
|
|
|
+server
|
|
|
+{
|
|
|
+ listen 443 ssl;
|
|
|
+ http2 on;
|
|
|
+ server_name push.rrbrr.com;
|
|
|
+ index index.html index.htm default.htm default.html;
|
|
|
+ root /data/ai/webhook/frontend/dist/build/h5;
|
|
|
+ include /www/server/panel/vhost/nginx/extension/push.rrbrr.com/*.conf;
|
|
|
+
|
|
|
+ ssl_certificate /www/server/panel/vhost/cert/push.rrbrr.com/fullchain.pem;
|
|
|
+ ssl_certificate_key /www/server/panel/vhost/cert/push.rrbrr.com/privkey.pem;
|
|
|
+ ssl_protocols TLSv1.2 TLSv1.3;
|
|
|
+ ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:!MD5;
|
|
|
+ ssl_prefer_server_ciphers on;
|
|
|
+ ssl_session_tickets on;
|
|
|
+ ssl_session_cache shared:SSL:10m;
|
|
|
+ ssl_session_timeout 10m;
|
|
|
+ add_header Strict-Transport-Security "max-age=31536000";
|
|
|
+ error_page 497 https://$host$request_uri;
|
|
|
+
|
|
|
+ # 后端 API(业务系统调用 /api/notify 发推送)
|
|
|
+ location /api/ {
|
|
|
+ proxy_pass http://127.0.0.1:13000;
|
|
|
+ proxy_http_version 1.1;
|
|
|
+ proxy_set_header Host $http_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;
|
|
|
+ }
|
|
|
+
|
|
|
+ # WebSocket(App 端长连接收推送)
|
|
|
+ location /ws {
|
|
|
+ proxy_pass http://127.0.0.1:13000;
|
|
|
+ proxy_http_version 1.1;
|
|
|
+ proxy_set_header Upgrade $http_upgrade;
|
|
|
+ proxy_set_header Connection "upgrade";
|
|
|
+ proxy_set_header Host $http_host;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_read_timeout 600s; # WS 长连接保活
|
|
|
+ }
|
|
|
+
|
|
|
+ # 后端管理台(可视化测试台)
|
|
|
+ location /admin {
|
|
|
+ proxy_pass http://127.0.0.1:13000;
|
|
|
+ proxy_http_version 1.1;
|
|
|
+ proxy_set_header Host $http_host;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ }
|
|
|
+
|
|
|
+ include /www/server/panel/vhost/rewrite/html_push.rrbrr.com.conf;
|
|
|
+
|
|
|
+ location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md)
|
|
|
+ {
|
|
|
+ return 404;
|
|
|
+ }
|
|
|
+
|
|
|
+ location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
|
|
|
+ {
|
|
|
+ expires 30d;
|
|
|
+ error_log /dev/null;
|
|
|
+ access_log /dev/null;
|
|
|
+ }
|
|
|
+
|
|
|
+ location ~ .*\.(js|css)?$
|
|
|
+ {
|
|
|
+ expires 12h;
|
|
|
+ error_log /dev/null;
|
|
|
+ access_log /dev/null;
|
|
|
+ }
|
|
|
+ access_log /www/wwwlogs/push.rrbrr.com.log;
|
|
|
+ error_log /www/wwwlogs/push.rrbrr.com.error.log;
|
|
|
+}
|