【发布时间】:2020-05-28 00:43:50
【问题描述】:
plantuml 在 docker 上运行。
端口必须从 8080:8080 更改为 8088:8080。
它适用于http://localhost:8088/uml,不适用于http://localhost:8088/plantuml
gitlab推荐如下配置
nginx['custom_gitlab_server_config'] = "location /-/plantuml { \n rewrite ^/-/(plantuml.*) /$1 break;\n proxy_cache off; \n proxy_pass http://localhost:8088/plantuml; \n}\n"
由于上述情况,我尝试了以下方法但没有成功(uml 而不是 plantuml)
nginx['custom_gitlab_server_config'] = "location /-/plantuml { \n rewrite ^/-/(plantuml.*) /$1 break;\n proxy_cache off; \n proxy_pass http://localhost:8088/uml; \n}\n"
您有什么建议可以解决这个问题吗?
编辑添加: 按照建议我试过了
nginx['custom_gitlab_server_config'] = "location /-/plantuml { \n rewrite ^/-/plantuml(.*) /uml$1 break;\n proxy_cache off; \n proxy_pass http://localhost:8088/uml; \n}\n"
调用https://gitlabdomain.com/uml/AxfDWj2tBq3CoKoPWR1Io8ZDoSa70000 的结果是 404
http 与 https 在这里是否相关?
【问题讨论】:
-
试试这个
nginx['custom_gitlab_server_config'] = "location /-/plantuml { \n rewrite ^/-/plantuml(.*) /uml$1 break;\n proxy_cache off; \n proxy_pass http://localhost:8088/uml; \n}\n"