[英]How to get rid of /site in Hippo CMS 13?
I'm trying to get rid of /site
in Hippo CMS version 13我正在尝试摆脱 Hippo CMS版本 13中的
/site
According to Hippo CMS version 12 documentation I can deploy my delivery application as ROOT.war ( https://documentation.bloomreach.com/12/library/deployment/configuring/deploy-application-as-root_war.html )根据 Hippo CMS版本 12文档,我可以将我的交付应用程序部署为 ROOT.war ( https://documentation.bloomreach.com/12/library/deployment/configuring/deploy-application-as-root_war.html )
However, that page is missing inside the documentation for version 13但是,版本 13的文档中缺少该页面
I found that Hippo CMS version 13 does not support deployment as ROOT.war ( https://documentation.bloomreach.com/library/deployment/system-architecture.html )我发现 Hippo CMS 版本 13 不支持部署为 ROOT.war ( https://documentation.bloomreach.com/library/deployment/system-architecture.html )
So, how do I get rid of /site?那么,我该如何摆脱 /site 呢? (Without changing nginx configurations)
(不改变 nginx 配置)
Thanks谢谢
I use a simple proxy server using Node.js, Express and http-proxy-middleware
, I called it dev-server.js
and to execute it you just run node dev-server.js
:我使用使用 Node.js、Express 和
http-proxy-middleware
的简单代理服务器,我将其命名为dev-server.js
并执行它,您只需运行node dev-server.js
:
const express = require('express')
const proxy = require('http-proxy-middleware')
const path = require('path')
const app = express()
const port = process.argv[2] || 9999
const cmsPort = 8080
// CMS webapp
app.use('/cms',
proxy({
target: `http://localhost:${cmsPort}`,
changeOrigin: false
})
)
// Website
app.use('/',
proxy({
target: `http://localhost:${cmsPort}/site`,
pathRewrite: {
'^/site/': '/'
},
ws: true,
changeOrigin: true
})
)
app.listen(port)
console.log(`Listening on port ${port} ...`)
I don't recommend you to get rid of it, but circumvent it for your needs instead.我不建议您摆脱它,而是根据您的需要绕过它。 Would this work for you?
这对你有用吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.