Apply SSL certificate in a bigger contextWhy I am getting “Problem loading the page” after enabling HTTPS...

Where is the fallacy here?

How do ISS astronauts "get their stripes"?

Is there a frame of reference in which I was born before I was conceived?

Avoiding unpacking an array when altering its dimension

When was drinking water recognized as crucial in marathon running?

I encountered my boss during an on-site interview at another company. Should I bring it up when seeing him next time?

chrony vs. systemd-timesyncd – What are the differences and use cases as NTP clients?

Second-rate spelling

What is a term for a function that when called repeatedly, has the same effect as calling once?

How to acknowledge an embarrassing job interview, now that I work directly with the interviewer?

Make me a metasequence

What are these green text/line displays shown during the livestream of Crew Dragon's approach to dock with the ISS?

What is the wife of a henpecked husband called?

How to count words in a line

If a druid in Wild Shape swallows a creature whole, then turns back to her normal form, what happens?

Did Amazon pay $0 in taxes last year?

Logistics of a hovering watercraft in a fantasy setting

How can I handle a player who pre-plans arguments about my rulings on RAW?

How do I construct an nxn matrix?

Reason Why Dimensional Travelling Would be Restricted

Difference between 小吃 and 零食

How to count occurrences of Friday 13th

What is the difference between ashamed and shamed?

Difference between 'stomach' and 'uterus'



Apply SSL certificate in a bigger context


Why I am getting “Problem loading the page” after enabling HTTPS for Apache on Windows 7?Wildcard SSL on Debian 7, Apache2 not working. (Rackspace Cloud Server)setting up multiple ssl certificates on same server/ip on CENTOs with apache 2.2How to Check if a SSL Certificate is successfully renewedUnbuntu server running Apache with an SSL Cert IssueMy SSL configuration aren't working. Ubuntu apache 2.4ServerAlias without www not working on SSL virtualhostServer redirecting to root vhost fileApache 2.4 using default DocumentRoot instead of VirtualHost DocumentRootLet's Encrypt wildcard certificates and Apache 2 not working













0















In my default-ssl



 <VirtualHost _default_:443>
ServerName example.co
DocumentRoot /var/www/html/example
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
</VirtualHost>
<VirtualHost *:443>
ServerName example2.co
DocumentRoot /var/www/html/example2
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
</VirtualHost>
<VirtualHost *:443>
ServerAlias subdomain1.*
DocumentRoot /var/www/html/example/subdomain1
</VirtualHost>
<VirtualHost *:443>
ServerAlias subdomain2.*
DocumentRoot /var/www/html/example/subdomain2
</VirtualHost>


I would like to apply the SSL certificate to the domain but apply a document root to different subdomains.



For some reason,



https://subdomain1.example.co/test is SECURE
https://subdomain1.example2.co/test is NOT SECURE


I have a wildcard SSL certificate for both.



Both should work.



Why can I designate SSL to all example.co and it's subdomains without a problem? Yet I can't do the same with example2.co?



I am trying to avoid creating lots of code for things are are pretty logical. Is there a shorter way to do this (my only solution):



 <VirtualHost *:443>
ServerName example.co
DocumentRoot /var/www/html/example
SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
</VirtualHost>
<VirtualHost *:443>
ServerName example2.co
DocumentRoot /var/www/html/example2
SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
</VirtualHost>
<VirtualHost *:443>
ServerName subdomain1.example.co
DocumentRoot /var/www/html/example/subdomain1
SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
</VirtualHost>
<VirtualHost *:443>
ServerName subdomain1.example2.co
DocumentRoot /var/www/html/example2/subdomain1
SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
</VirtualHost>
<VirtualHost *:443>
ServerName subdomain2.example.co
DocumentRoot /var/www/html/example/subdomain2
SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
</VirtualHost>
<VirtualHost *:443>
ServerName subdomain2.example2.co
DocumentRoot /var/www/html/example2/subdomain2
SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
</VirtualHost>









share|improve this question





























    0















    In my default-ssl



     <VirtualHost _default_:443>
    ServerName example.co
    DocumentRoot /var/www/html/example
    SSLEngine On
    SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
    </VirtualHost>
    <VirtualHost *:443>
    ServerName example2.co
    DocumentRoot /var/www/html/example2
    SSLEngine On
    SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
    </VirtualHost>
    <VirtualHost *:443>
    ServerAlias subdomain1.*
    DocumentRoot /var/www/html/example/subdomain1
    </VirtualHost>
    <VirtualHost *:443>
    ServerAlias subdomain2.*
    DocumentRoot /var/www/html/example/subdomain2
    </VirtualHost>


    I would like to apply the SSL certificate to the domain but apply a document root to different subdomains.



    For some reason,



    https://subdomain1.example.co/test is SECURE
    https://subdomain1.example2.co/test is NOT SECURE


    I have a wildcard SSL certificate for both.



    Both should work.



    Why can I designate SSL to all example.co and it's subdomains without a problem? Yet I can't do the same with example2.co?



    I am trying to avoid creating lots of code for things are are pretty logical. Is there a shorter way to do this (my only solution):



     <VirtualHost *:443>
    ServerName example.co
    DocumentRoot /var/www/html/example
    SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
    </VirtualHost>
    <VirtualHost *:443>
    ServerName example2.co
    DocumentRoot /var/www/html/example2
    SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
    </VirtualHost>
    <VirtualHost *:443>
    ServerName subdomain1.example.co
    DocumentRoot /var/www/html/example/subdomain1
    SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
    </VirtualHost>
    <VirtualHost *:443>
    ServerName subdomain1.example2.co
    DocumentRoot /var/www/html/example2/subdomain1
    SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
    </VirtualHost>
    <VirtualHost *:443>
    ServerName subdomain2.example.co
    DocumentRoot /var/www/html/example/subdomain2
    SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
    </VirtualHost>
    <VirtualHost *:443>
    ServerName subdomain2.example2.co
    DocumentRoot /var/www/html/example2/subdomain2
    SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
    </VirtualHost>









    share|improve this question



























      0












      0








      0








      In my default-ssl



       <VirtualHost _default_:443>
      ServerName example.co
      DocumentRoot /var/www/html/example
      SSLEngine On
      SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName example2.co
      DocumentRoot /var/www/html/example2
      SSLEngine On
      SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerAlias subdomain1.*
      DocumentRoot /var/www/html/example/subdomain1
      </VirtualHost>
      <VirtualHost *:443>
      ServerAlias subdomain2.*
      DocumentRoot /var/www/html/example/subdomain2
      </VirtualHost>


      I would like to apply the SSL certificate to the domain but apply a document root to different subdomains.



      For some reason,



      https://subdomain1.example.co/test is SECURE
      https://subdomain1.example2.co/test is NOT SECURE


      I have a wildcard SSL certificate for both.



      Both should work.



      Why can I designate SSL to all example.co and it's subdomains without a problem? Yet I can't do the same with example2.co?



      I am trying to avoid creating lots of code for things are are pretty logical. Is there a shorter way to do this (my only solution):



       <VirtualHost *:443>
      ServerName example.co
      DocumentRoot /var/www/html/example
      SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName example2.co
      DocumentRoot /var/www/html/example2
      SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName subdomain1.example.co
      DocumentRoot /var/www/html/example/subdomain1
      SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName subdomain1.example2.co
      DocumentRoot /var/www/html/example2/subdomain1
      SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName subdomain2.example.co
      DocumentRoot /var/www/html/example/subdomain2
      SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName subdomain2.example2.co
      DocumentRoot /var/www/html/example2/subdomain2
      SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
      </VirtualHost>









      share|improve this question
















      In my default-ssl



       <VirtualHost _default_:443>
      ServerName example.co
      DocumentRoot /var/www/html/example
      SSLEngine On
      SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName example2.co
      DocumentRoot /var/www/html/example2
      SSLEngine On
      SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerAlias subdomain1.*
      DocumentRoot /var/www/html/example/subdomain1
      </VirtualHost>
      <VirtualHost *:443>
      ServerAlias subdomain2.*
      DocumentRoot /var/www/html/example/subdomain2
      </VirtualHost>


      I would like to apply the SSL certificate to the domain but apply a document root to different subdomains.



      For some reason,



      https://subdomain1.example.co/test is SECURE
      https://subdomain1.example2.co/test is NOT SECURE


      I have a wildcard SSL certificate for both.



      Both should work.



      Why can I designate SSL to all example.co and it's subdomains without a problem? Yet I can't do the same with example2.co?



      I am trying to avoid creating lots of code for things are are pretty logical. Is there a shorter way to do this (my only solution):



       <VirtualHost *:443>
      ServerName example.co
      DocumentRoot /var/www/html/example
      SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName example2.co
      DocumentRoot /var/www/html/example2
      SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName subdomain1.example.co
      DocumentRoot /var/www/html/example/subdomain1
      SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName subdomain1.example2.co
      DocumentRoot /var/www/html/example2/subdomain1
      SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName subdomain2.example.co
      DocumentRoot /var/www/html/example/subdomain2
      SSLCertificateFile /etc/letsencrypt/live/example.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example.co/chain.pem
      </VirtualHost>
      <VirtualHost *:443>
      ServerName subdomain2.example2.co
      DocumentRoot /var/www/html/example2/subdomain2
      SSLCertificateFile /etc/letsencrypt/live/example2.co/cert.pem
      SSLCertificateKeyFile /etc/letsencrypt/live/example2.co/privkey.pem
      SSLCertificateChainFile /etc/letsencrypt/live/example2.co/chain.pem
      </VirtualHost>






      apache-2.4 ssl-certificate lets-encrypt






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 4 hours ago







      Matthew Semik

















      asked 5 hours ago









      Matthew SemikMatthew Semik

      1114




      1114






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "2"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f956749%2fapply-ssl-certificate-in-a-bigger-context%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f956749%2fapply-ssl-certificate-in-a-bigger-context%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Фонтен-ла-Гаярд Зміст Демографія | Економіка | Посилання |...

          Список ссавців Італії Природоохоронні статуси | Список |...

          Маріан Котлеба Зміст Життєпис | Політичні погляди |...