Last active
October 28, 2017 10:20
-
-
Save zhu2688/ff306224d253ab1edd79 to your computer and use it in GitHub Desktop.
nginx 代理的配置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
###nginx.conf | |
proxy_buffer_size 256k; | |
proxy_buffers 4 512k; | |
proxy_busy_buffers_size 512k; | |
proxy_cache_path /opt/mylmp/cache/nginx/cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m; | |
proxy_temp_path /opt/mylmp/cache/nginx/tmp; | |
###proxy.conf | |
###general | |
location ^~ /aaaa-bbbb-cccc-dddd/ { | |
subs_filter (src|href|action|location)\s?=\s?('|")?/([^\s]*)('|")? $1=$2/aaaa-bbbb-cccc-dddd/$3$4 gir; | |
subs_filter http://192.168.100.16:81/ /aaaa-bbbb-cccc-dddd/ i; | |
subs_filter http://192.168.100.16/ /aaaa-bbbb-cccc-dddd/ i; | |
subs_filter_types text/css text/xml text/plain text/javascript application/x-javascript application/x-json; | |
proxy_pass http://192.168.100.16:81/; | |
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; | |
proxy_redirect ~*^(http[s]?://[^:]+:?\d+?)/(.+)$ /aaaa-bbbb-cccc-dddd/$2; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Accept-Encoding ''; | |
} | |
###OA | |
location ^~ /aaaa-bbbb-cccc-dddd/ { | |
subs_filter (src|href|action|location)\s?=\s?('|")?/([^\s]*)('|")? $1=$2/aaaa-bbbb-cccc-dddd/$3$4 gir; | |
subs_filter http://192.168.100.16:81/ /aaaa-bbbb-cccc-dddd/ i; | |
subs_filter http://192.168.100.16/ /aaaa-bbbb-cccc-dddd/ i; | |
subs_filter ([^\?])(settingUrl|sUrl|url|value|gridUrl|target|backarrow|breadcrumbarrow|IMAGESPATH|ajaxUrl|URL|redirectUrl|imgPath|iconImg|iconImg_over|Icon)(\s)*=(\s)*('|")?\s?/(?!href|\^) $1$2=$5/aaaa-bbbb-cccc-dddd/ gr; | |
subs_filter /help/sys/help.html /aaaa-bbbb-cccc-dddd/help/sys/help.html ; | |
subs_filter /wui/theme/ecology7/page/images/leftmenu/loader.gif /aaaa-bbbb-cccc-dddd/wui/theme/ecology7/page/images/leftmenu/loader.gif i; | |
subs_filter (disModalDialogRtnM|url|get|loadFile|load|open|post|openFullWindowForXtable|openFullWindowHaveBarForWFList|showModalDialog|weaverTable|DWREngine\._execute|goopenWindow|openFullWindowHaveBar)\((['|"]?)/([^\s]*)(['|"]?) $1($2/aaaa-bbbb-cccc-dddd/$3$4 gir; | |
subs_filter (:|,|return)\s*('|")/(docs|cpt|workplan|wui|workflow|js|hrm|page|images|email|systeminfo) $1$2/aaaa-bbbb-cccc-dddd/$3 gir; | |
subs_filter \sbatch\.path \"/aaaa-bbbb-cccc-dddd/\"+batch.path gir; | |
subs_filter_types text/css text/xml text/plain text/javascript application/x-javascript application/x-json; | |
proxy_pass http://192.168.100.16:81/; | |
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504; | |
proxy_redirect ~*^(http[s]?://[^:]+:?\d+?)/(.+)$ /aaaa-bbbb-cccc-dddd/$2; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Accept-Encoding ''; | |
} |
修在jquery.js1.4中
rurl = /^(\w+:)?//([^\/?#]+)/,
被替换了
增加匹配
disModalDialogRtnM("/systeminfo/.......
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
修正在jquery.js1.4中
rspecialurl = /href|src|style/,
被替换了