{"id":85,"date":"2004-12-13T22:21:00","date_gmt":"2004-12-13T22:21:00","guid":{"rendered":"http:\/\/bitpost.com\/news\/?p=14"},"modified":"2008-07-24T23:05:29","modified_gmt":"2008-07-25T04:05:29","slug":"use-the-ports-luke","status":"publish","type":"post","link":"https:\/\/bitpost.com\/news\/2004\/use-the-ports-luke\/","title":{"rendered":"One Apache, multiple SSL websites"},"content":{"rendered":"<p>One apache installation can easily host multiple domains using a couple different VirtualHost directives.  Basically, a standard HTTP request includes the requested domain name, and Apache uses that to determine which pages to serve up.<\/p>\n<p>From what I understand, SSL-encrypted sites are a wee bit trickier, because HTTPS requests are encrypted and the requested domain name isn&#8217;t available.  So all you have to go by is the IP address&#8230;. and the port.  So that&#8217;s the trick &#8211; you have to use a different port for each SSL-encrypted domain name you want to support.<\/p>\n<p>Steps to make Apache listen for SSL requests for different domains on 443 and 8080:<\/p>\n<li>Add &#8220;Listen 443&#8221; and &#8220;Listen 8080&#8221; directives at the top of your apache configuration.\n<li>Add a &#8220;VirtualHost myfirstsite.com:443&#8221; block for the first site, and a &#8220;VirtualHost mysecondsite.com:8080&#8221; for the second.\n<li>Make sure your firewall allows incoming traffic on both ports.\n<p>See?  Easy.  :>  And since your website will typically redirect traffic to SSL pages (as opposed to expecting users to type them in), hopefully using a non-default port won&#8217;t be a problem.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One apache installation can easily host multiple domains using a couple different VirtualHost directives. Basically, a standard HTTP request includes the requested domain name, and Apache uses that to determine which pages to serve up. From what I understand, SSL-encrypted sites are a wee bit trickier, because HTTPS requests are encrypted and the requested domain [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[10,9],"tags":[],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-tricks-tips-tools","category-websites"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9M11L-1n","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":1,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"predecessor-version":[{"id":243,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/posts\/85\/revisions\/243"}],"wp:attachment":[{"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitpost.com\/news\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}