我正在使用我的odoo实例中的多个网站,并刚刚从nginx切换到caddy。我试图配置caddy来处理我所有的域,但是我总是在同一个odoo网站上结束
这是我的档案
domain1.com {
redir https://www.domain1.com{uri}
}
domain2.com {
redir https://www.domain2.com{uri}
}
domain3.com {
redir https://www.domain3.com{uri}
}
www.domain1.com, www.domain2.com, www.domain3.com {
reverse_proxy http://127.0.0.1:8069 {
header_up X-Forwarded-Proto https
header_up X-Forwarded-Host {host}
header_up X-Url-Scheme {scheme}
header_up X-Real-IP {remote}
}
encode gzip zstd
file_server
log
}通常,添加标题应该足以使odoo识别域,对吗?
我已经在odoo网站配置上设置了域
==编辑==基本上我需要的是翻译这些nginx“语句”,以便与Caddy一起工作。
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;发布于 2022-07-19 12:33:40
用Caddy重定向多网站
Caddyfile配置
www.example.info {
redir https://example.com{uri}
}
exampleone.com {
redir https://example.com{uri}
}
exampletwo.com {
redir https://example.com{uri}
}
examplethree.com {
redir https://example.com{uri}
}
# Redirecting Here
https://example.com {
......
}请参阅更多的凯迪例子
https://stackoverflow.com/questions/73034873
复制相似问题