Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-26-2009, 03:41 PM   #1
Registered: Dec 2007
Posts: 30

Rep: Reputation: 15
Apache 2.2 Two Virtual Hosts with same DocumentRoot problem

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 Another part of the site is for the admin interface is secure. It requires user name and password. This URL is

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 is setup as <Virtual Host *:80> and the admin side 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.
Old 05-26-2009, 08:16 PM   #2
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,395

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
Give exact error msgs so we can see the problem, also the vhosts definitions


apache, ssl, virtualhosts

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache virtual hosts problem alienDog Slackware 9 01-30-2008 12:54 PM
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
Apache Virtual Hosts ToothlessRebel Linux - Networking 6 10-06-2006 02:11 PM
Apache virtual hosts and mod_rewrite problem Gyper Debian 3 07-31-2006 11:22 PM
Problem with Apache Virtual Hosts jaberwooky Linux - Software 4 09-23-2003 01:37 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration