I have several virtual hosts installed on my local dev machine using Apache / 2.2.24 on OS X 10.9 (Mavericks).
My http-vhosts.conf file (which is configured to download via httpd.conf is as follows:
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "/Library/WebServer/Documents" ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot "/Users/me/Sites/testsite.com ServerName testsite.dev </VirtualHost> <VirtualHost *:80> DocumentRoot "/Users/me/Sites/testsite2.com ServerName testsite2.dev </VirtualHost>
I also configured the / etc / vhosts file containing this line:
127.0.0.1 testsite2.dev
I want to be able to use testite2.dev over SSL (https). I tried several vhosts configuration file configurations with no luck.
In this current configuration, going to http://testsite2.dev , pulls up the page I expect while https://testsite2.dev points to the apache homepage in /Library/WebServer/Documents/index.html.en
I tried the following configuration and several others that do not work:
NameVirtualHost *:80 NameVirtualHost *:443 <VirtualHost *:80> DocumentRoot "/Library/WebServer/Documents" ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot "/Users/me/Sites/testsite.com ServerName testsite.dev </VirtualHost> <VirtualHost *:80 *:443> DocumentRoot "/Users/me/Sites/testsite2.com ServerName testsite2.dev </VirtualHost>
Is it possible for a virtual host to listen on port 80 and port 443 on the local computer?
source share