0

Desperately seeking help, I am hosting multiple Drupal 7 sites on one Ubuntu 16 on AWS using apache. I have domain1.com and new.domain2.com In the DNS level, I am pointing to this computer IP for domain1.com and www.domain1.com I am also pointing to this IP with “new.domain2.com” (while domain2.com and www.domain2.com points to another server (new.domain2.com is in development to replace the old one at domin2.com)) Domain1.com is naturally setup in a sub-directory called “site/domain1.com”, and no extra work is needed. In the case of domin2, the directory is called “site/domain2.com” but using the redirection file in “sites/sites.php” I internally change “new.domain2.com” to “domain2.com” using the line: “$sites['new.domain2.com'] = 'domain2.com';” So far everything works just fine the redirection from new.domain2.com to domain2.com is done by “sites/sites.php”.

Now I wanted to install let’s encrypt on both domains. I used the instruction in: https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04 I used the following lines to create the SSL Certificates: sudo certbot --apache -d domain1.com -d www.domain1.com and sudo certbot --apache -d new.domain2.com

The results are: http://domain1.com is redirected to https://domain1.com and shows: “your connection is not private” NET::ERR_CERT_COMMON_NAME_INVALID

http://new.domain2.com: fine but says “Not Secure.” https://new.domin2.com: fine and secure (as it should be)

In trying to assess the problem with my limited knowledge, I believe that the redirect used by Drupal and the redirect used by “certbot” are conflicting or simply not playing nice. What I am seeking is help in debugging or solving this or someone pointing me to a similar problem solved by others or at least a good article explaining the redirecting system used by let’s encrypt and Drupal. Thanks in advance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.