I've got a web server running Apache 2.2. Part of the URL is for the public, so anyone can access it. Let's say the URL is http://www.homepage.com
. Another part of the site is for the admin interface is secure. It requires user name and password. This URL is https://www.homepage.com/admin
This site was setup before I got to this job, but the previous guy set both the public side and admin side up with their own Virtual Host. The main URL www.homepage.com
is setup as <Virtual Host *:80> and the admin side https://www.homepage.com/admin
is setup as <VirtualHost *:443>, but this side has the <Location /admin> tag for the admin side, so that it knows to only apply SSL when the "/admin" is in the URL.
The problem is I can't get the PKI login to work. I was told this might be because both Virtual Hosts have DocumentRoot set to the same folder on the hard drive. My question is: is this a problem? Can I have two virtual hosts, same IP address, same machine, just a slightly different URL be set to the same DocumentRoot? Thanks.
More information: I have my approved certificates and key installed. The settings for the certficate are in the second (the 443) VirtualHost tag. Also, I have Listen 80 and Listen 443 both set, but they are in different conf files, but both are set as include in the main httpd.conf file. "Listen 80" is actually in the main httpd.conf file and "Listen 443" is in the httpd-ssl.conf file. The VirtualHosts are set in the httpd-vhosts.conf file.