New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jumpserver 服务应该增加一个 url 前缀 #1759

Open
colben opened this Issue Aug 31, 2018 · 4 comments

Comments

Projects
None yet
3 participants
@colben

colben commented Aug 31, 2018

jumpserver 服务的 url 没有匹配规则,在访问用户列表时,地址是
http://192.168.1.101/users/user/
在访问资产列表时,地址是
http://192.168.1.101/assets/asset/
在访问资产授权是,地址是
http://192.168.1.101/perms/asset-permission/
,这几个 URL 没有规律,所以用 nginx 反代时必须得用 location / {} 来实现

使用版本

master 分支最新版

具体表现[截图可能会更好些,最好能截全]

应该在 jumpserver 增加一个 url 前缀(例如“/jmp/”),其他组件(录像、static、luna)就不用了,实现通过以下url来访问
用户列表 http://192.168.1.101/jms/users/user/
资产列表 http://192.168.1.101/jms/assets/asset/
资产授权 http://192.168.1.101/jms/perms/asset-permission/
这样在 nginx 中就可以用 location ^~ /jms/ {} 实现反代了

@wojiushixiaobai

This comment has been minimized.

Show comment
Hide comment
@wojiushixiaobai

wojiushixiaobai Aug 31, 2018

Collaborator

@colben 请用域名解决

Collaborator

wojiushixiaobai commented Aug 31, 2018

@colben 请用域名解决

@colben

This comment has been minimized.

Show comment
Hide comment
@colben

colben Aug 31, 2018

@wojiushixiaobai 能不能别用域名?这个服务部署在内网服务器,有的同事得在内网访问,有的同事得通过外部防火墙从做端口映射从公网访问,而且这么多同事都得配置手动修改hosts?

colben commented Aug 31, 2018

@wojiushixiaobai 能不能别用域名?这个服务部署在内网服务器,有的同事得在内网访问,有的同事得通过外部防火墙从做端口映射从公网访问,而且这么多同事都得配置手动修改hosts?

@ibuler

This comment has been minimized.

Show comment
Hide comment
@ibuler

ibuler Aug 31, 2018

Member

localtion /jms/(.*) {
proxy_pass http://xxx/$1;
}

Member

ibuler commented Aug 31, 2018

localtion /jms/(.*) {
proxy_pass http://xxx/$1;
}

@colben

This comment has been minimized.

Show comment
Hide comment
@colben

colben Aug 31, 2018

这样写不对,jumpserver前端返回的url里是没有 /jms/ 的

colben commented Aug 31, 2018

这样写不对,jumpserver前端返回的url里是没有 /jms/ 的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment