{"id":613,"date":"2022-10-24T11:47:35","date_gmt":"2022-10-24T18:47:35","guid":{"rendered":"https:\/\/blog.iabsolute.com\/?p=613"},"modified":"2022-10-24T11:47:35","modified_gmt":"2022-10-24T18:47:35","slug":"using-multiple-ssl-certificates-in-apache-with-one-ip-address","status":"publish","type":"post","link":"https:\/\/blog.iabsolute.com\/?p=613","title":{"rendered":"Using Multiple SSL Certificates in Apache with One IP Address"},"content":{"rendered":"\n<p>Next, in the NameVirtualHost directive list your server&#8217;s public IP address, *:443, or other port you&#8217;re using for SSL (see example below).<\/p>\n\n\n\n<p>Then point the SSLCertificateFile, SSLCertificateKeyFile, and SSLCertificateChainFile to the locations of the certificate files for each website as shown below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>NameVirtualHost *:443<\/strong>\n\n&lt;<strong>VirtualHost *:443<\/strong>&gt;\n <strong>ServerName www.yoursite.com<\/strong>\n <strong>DocumentRoot \/var\/www\/site<\/strong>\n SSLEngine on\n SSLCertificateFile \/path\/to\/www_yoursite_com.crt\n SSLCertificateKeyFile \/path\/to\/www_yoursite_com.key\n SSLCertificateChainFile \/path\/to\/DigiCertCA.crt\n&lt;\/VirtualHost&gt;\n\n&lt;<strong>VirtualHost *:443<\/strong>&gt;\n <strong>ServerName www.yoursite2.com<\/strong>\n <strong>DocumentRoot \/var\/www\/site2<\/strong>\n SSLEngine on\n SSLCertificateFile \/path\/to\/www_yoursite2_com.crt\n SSLCertificateKeyFile \/path\/to\/www_yoursite2_com.key\n SSLCertificateChainFile \/path\/to\/DigiCertCA.crt\n&lt;\/VirtualHost&gt;\n<\/pre>\n\n\n\n<p>If you have a Wildcard or Multi-Domain SSL Certificate all of the websites using the same certificate need to reference the same IP address in the VirtualHost IP address:443 section like in the example below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;<strong>VirtualHost 192.168.1.1:443<\/strong>&gt;\n <strong>ServerName www.domain.com<\/strong>\n <strong>DocumentRoot \/var\/www\/<\/strong>\n SSLEngine on\n SSLCertificateFile \/path\/to\/your_domain_name.crt\n SSLCertificateKeyFile \/path\/to\/your_private.key\n SSLCertificateChainFile \/path\/to\/DigiCertCA.crt\n&lt;\/VirtualHost&gt;<br>\n&lt;<strong>VirtualHost 192.168.1.1:443<\/strong>&gt;\n <strong>ServerName site2.domain.com<\/strong>\n <strong>DocumentRoot \/var\/www\/site2<\/strong>\n SSLEngine on\n SSLCertificateFile \/path\/to\/your_domain_name.crt\n SSLCertificateKeyFile \/path\/to\/your_private.key\n SSLCertificateChainFile \/path\/to\/DigiCertCA.crt\n&lt;\/VirtualHost&gt;\n\t\t<\/pre>\n\n\n\n<p>Now restart Apache and access the https site from a browser that supports SNI. If you set it up correctly, you will access the site without any warnings or problems. You can add as many websites or SSL Certificates as you need using the above process.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Next, in the NameVirtualHost directive list your server&#8217;s public IP address, *:443, or other port you&#8217;re using for SSL (see example below). Then point the SSLCertificateFile, SSLCertificateKeyFile, and SSLCertificateChainFile to the locations of the certificate files for each website as &hellip; <a href=\"https:\/\/blog.iabsolute.com\/?p=613\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36,21],"tags":[],"class_list":["post-613","post","type-post","status-publish","format-standard","hentry","category-godday","category-ssl"],"_links":{"self":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=613"}],"version-history":[{"count":1,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/613\/revisions"}],"predecessor-version":[{"id":614,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=\/wp\/v2\/posts\/613\/revisions\/614"}],"wp:attachment":[{"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iabsolute.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}