12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- server {
- listen 10000;
- server_name localhost;
- underscores_in_headers on;
- # 切记, 在docker启动的nginx 必须将该文件中所有的 localhost 改成服务器的 内网ip (不能为 127.0.0.1)
- # boot版本跟cloud 版本的区别在此, 8764为 zuihou-authority-server 项目启动的端口
- location /api/authority/ {
- proxy_pass http://192.168.1.34:8764/;
- }
- location /api/file/ {
- proxy_pass http://192.168.1.34:8764/;
- }
- location /api/msgs/ {
- proxy_pass http://192.168.1.34:8764/;
- }
- location /api/gate/{
- proxy_pass http://localhost:8764/;
- }
- location /zuihou-ui {
- proxy_set_header Host $host:$server_port;
- proxy_redirect off;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_connect_timeout 60;
- proxy_read_timeout 600;
- proxy_send_timeout 600;
- root /data/projects/;
- index index.html;
- }
- # 文件跨域
- location /crossdomain.xml {
- alias /usr/local/nginx/html/crossdomain.xml;
- }
- # 文件访问配置
- location ^~ /file {
- if ($request_uri ~* ^.*\/(.*)\.(apk|java|txt|doc|pdf|rar|gz|zip|docx|exe|xlsx|ppt|pptx|jpg|png)(\?fileName=([^&]+))$) {
- add_header Content-Disposition "attachment;filename=$arg_attname";
- }
- root /data/projects/uploadfile;
- index index.html;
- }
- }
- server {
- listen 180;
- server_name localhost;
- underscores_in_headers on;
- location /zuihou-admin-ui {
- proxy_set_header Host $host:$server_port;
- proxy_redirect off;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_connect_timeout 60;
- proxy_read_timeout 600;
- proxy_send_timeout 600;
- root /data/projects/;
- index index.html;
- }
- }
|