Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have the following in my httpd.conf file

NameVirtualHost *:80

<IfModule mod_vhost_alias.c>
  <VirtualHost *:80>
    ServerAlias *
    UseCanonicalName Off
    LogFormat "%V %h %l %u %t \"%r\" %s %b" vcommon
    CustomLog /var/log/httpd/access_log vcommon
    VirtualDocumentRoot /web-data/vhosts/%0/httpdocs
    VirtualScriptAlias  /web-data/vhosts/%0/httpdocs

This works great for dynamic hosting. However, I can't figure out how to make https requests work the same way. What do I need to add to this so that https and http for the same domain request get sent to the same folder?

share|improve this question

marked as duplicate by Jenny D, Rex, Ward, dawud, Katherine Villyard Feb 22 '14 at 15:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

It is not technically possible with Apache2 to do this without a wildcard SSL certificate as Apache will have only 1 certificate to serve. I.e. your certificate will say it's for "" yet the request will be for "".

See NameBasedSSLVHosts

However, it is possible using some extension but this is too complicated to explain all in one post here. So here is a link: NameBasedSSLVHostsWithSNI

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.