简体   繁体   English

多域Hybris服务器配置

[英]Multiple Domain Hybris Server configuration

I have a Hybris server installation hosting two sites hosted on two directories /site1 and /site2 pointing to two different domains such as www.site1.com and www.site2.com and both domains point to same ELB endpoint. 我有一个Hybris服务器安装,托管两个站点,两个站点托管在两个目录/ site1和/ site2上,指向两个不同的域,例如www.site1.com和www.site2.com,并且两个域均指向同一ELB端点。 In our current setup, we use the proxy web server (rewrite method) to add the /sitepath to the domain names. 在当前设置中,我们使用代理Web服务器(重写方法)将/ sitepath添加到域名中。 Eg: ELBcname/site1 and ELBcname/site2. 例如:ELBcname / site1和ELBcname / site2。 We do this because both sites are deployed in the same instance. 我们这样做是因为两个站点都部署在同一实例中。

As far as I know Hybris installation use apache-tomcat as their application web server. 据我了解,Hybris的安装使用apache-tomcat作为其应用程序Web服务器。 Can I do Apache Namevirtualhost configuration to point the two domains to these with different document root to avoid using the proxy server? 我可以进行Apache Namevirtualhost配置以将两个域指向具有不同文档根目录的两个域,以避免使用代理服务器吗?

Eg: 例如:

 <VirtualHost *:80> DocumentRoot "/hybrisdocroot/site1/" ServerName site1 </VirtualHost> <VirtualHost *:80> DocumentRoot "/hybrisdocroot/site2/" ServerName site2 </VirtualHost> 

Or is there any provision to add the path to Cname of ELB or ALB? 还是有规定将路径添加到ELB或ALB的Cname?

I would drop the proxy entirely, terminate SSL at the ELB with ACM Certificates on each domain (ie ssl common name *.site1.com and *.site2.com) and eliminate the path completely. 我将完全删除代理,在每个域上的ACM证书 (即ssl公用名* .site1.com和* .site2.com)处终止ELB上的SSL,并完全消除该路径。 Let the site answer at the fully qualified domain name (FQDN) only, and ideally only on HTTPS - HTTP is really disfavored now IMHO. 让站点仅在完全限定的域名(FQDN)上答复,理想情况下仅在HTTPS上答复-IMHO现在真的不赞成使用HTTP。

The path construction you indicate may have been used to simplify SSL termination and eliminate the number of certs needed for the service. 您指示的路径构造可能已用于简化SSL终止并消除该服务所需的证书数量。 Since ACM certs are free, the goal should be to provision each site with its own proper SSL cert. 由于ACM证书是免费的,因此目标应该是为每个站点提供其自己的适当SSL证书。

Or is there any provision to add the path to Cname of ELB or ALB? 还是有规定将路径添加到ELB或ALB的Cname?

No. And in any case not needed if you eliminate the path from the URI to reach each site. 不可以。在任何情况下,如果您消除了从URI到达每个站点的路径,则不需要。 And of course you can use ELB CNAMEs/ALIAS for a FQDN. 当然,您可以将ELB CNAMEs / ALIAS用于​​FQDN。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM