Two domains, two certificates, one single directory for contents ...

Remitur

Verified User
Joined
May 11, 2018
Messages
69
Location
Sežana (Slovenia)
Hello.

I have the following needs:

  1. two different domains: example.com and example.net
  2. each of both domains needs his own SSL certificate (not LE)
  3. one single hosting space for contents (i.e. domains/example.com/public_html
  4. the user needs to stay with his browser on the original domain (example.com or example.net), not to be redirected on the other one
The software in domains/example.com/public_html is a CMS configured to act differently, according to the value of $_SERVER['HTTP_HOST'] of the visitors.

How to do it?

A - If I set example.net as an alias of example.com, it works but I have no way to add a certificate for example.net, but just and only for example.com

B - If I set example.net as a pointer for example.com, I get a simple redirect and the user is simply forwarded to example.com

C - If I set example.net with its own hosting space, as a new domain, I can add its own SSL certificate, everything works, but I need to duplicate the contents of domains/example.com/public_html in domains/example.net/public_html (and I don't want it...)

I guess I could do it acting as C, and then creating a symlink from domains/example.net/public_html to domains/example.com/public_html but ... if it's so, how can I create such a symlink in DA?
 
You can try to use symlink from public_html of one domain to another, but not sure it will work.
But most correct will be to set up custom document_root (if You have admin privileges)
at custom_httpd at main page for domain example.com add record:
|?DOCROOT=/the/new/path/you/want|
for example for example.com :
|?DOCROOT=/home/username/domains/example.net/public_html|
then save
 
Back
Top