0
votes

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. In our current setup, we use the proxy web server (rewrite method) to add the /sitepath to the domain names. Eg: ELBcname/site1 and 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. Can I do Apache Namevirtualhost configuration to point the two domains to these with different document root to avoid using the proxy server?

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?

1
What is the reason for the /path construction? You can deploy 2 sites on the same instance without this.Rodrigo M
@RodrigoM Can I deploy the two different sites in the same Hybris system on same port? the path is used to differentiate two different sites.joseph
Yes for sure. See my comment below.Rodrigo M

1 Answers

0
votes

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. Let the site answer at the fully qualified domain name (FQDN) only, and ideally only on HTTPS - HTTP is really disfavored now IMHO.

The path construction you indicate may have been used to simplify SSL termination and eliminate the number of certs needed for the service. Since ACM certs are free, the goal should be to provision each site with its own proper SSL cert.

Or is there any provision to add the path to Cname of ELB or ALB?

No. And in any case not needed if you eliminate the path from the URI to reach each site. And of course you can use ELB CNAMEs/ALIAS for a FQDN.