电脑桌面
添加蚂蚁七词文库到电脑桌面
安装后可以在桌面快捷访问

金蝶s-HR Cloud 基于linux配置nginx反向代理.docx

金蝶s-HR Cloud 基于linux配置nginx反向代理.docx_第1页
1/3
金蝶s-HR Cloud 基于linux配置nginx反向代理.docx_第2页
2/3
金蝶s-HR Cloud 基于linux配置nginx反向代理.docx_第3页
3/3
基于nginx配置实现隐藏金蝶s-HR访问地址的端口和上下文路径1.前言通常我们访问s-HR系统的地址一般是http://[域名或ip]:8080/shr,现有客户需要隐藏掉端口8080和shr,希望能做到直接访问域名即可访问到系统,不需要填写端口和shr。因s-HR系统需要结合portal、easweb、web、eassso等子项目配合使用,故地址栏不能隐藏shr,这里只能做到输入域名默认跳转shr,不用客户手动输入shr。本文档面向服务器管理员,需要有一定的服务器管理知识。2.安装nginx下载安装最新稳定版本nginx,具体安装方法请自行查阅相关资料。3.配置nginx打开nginx目录conf下的nginx.conf,增加和修改如下配置即可:server{listen80;server_namelocalhost;server_namewww.test.com;server_name_in_redirectoff;#charsetkoi8-r;#access_loglogs/host.access.logmain;location/{roothtml;indexredir.htmlindex.htmlindex.htm;}location/shr/{proxy_redirectoff;proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$remote_addr;proxy_passhttp://localhost:6888/shr/;}location/easweb/{proxy_redirectoff;proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$remote_addr;proxy_passhttp://localhost:6888/easweb/;}location/web/{proxy_redirectoff;proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$remote_addr;proxy_passhttp://localhost:6888/web/;}location/res/{proxy_redirectoff;proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$remote_addr;proxy_passhttp://localhost:6888/res/;}location/eassso/{proxy_redirectoff;proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$remote_addr;proxy_passhttp://localhost:6888/eassso/;}location/portal/{proxy_redirectoff;proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$remote_addr;proxy_passhttp://localhost:6888/portal/;}#如shr有更多子项目目录,这里可以再按上面格式添加}其中将www.test.com换成客户自己的域名,http://localhost:6888/[xxx]/换成客户实际系统地址。如果有用到SSL,请按nginx的配置另行修改4.增加默认跳转页面在nginx安装目录html下新增redir.html文件,用于默认首页跳转到shr/,文件内容如下:5.完成启动或重启nginx,直接访问域名www.xxx.com,即可正常访问到s-HR系统,查看浏览器地址栏,端口号不会显示,shr项目名会自动添加上去。

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

金蝶s-HR Cloud 基于linux配置nginx反向代理.docx

确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息
QQ群
  • 答案:my7c点击这里加入QQ群
支持邮箱
微信
  • 微信