LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-26-2009, 03:41 PM   #1
Sysop1911
Member
 
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 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.
 
Old 05-26-2009, 08:16 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

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


Reply

Tags
apache, ssl, virtualhosts



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 11 09-25-2020 09:42 AM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:34 AM.

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