LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-18-2004, 04:02 PM   #1
hegele
LQ Newbie
 
Registered: Feb 2004
Distribution: Mandrake
Posts: 3

Rep: Reputation: 0
Having Problems With Apache 2 And Multiple Virtual Hosts


I've recently installed Mandrake Linux 9.2 with Apache 2.0.47 and I'm really struggling with setting up virtual hosts in Apache. I set them up successfully using Red Hat 8 and a previous version of Apache, but I just can't seem to get it to work at all this time around.

OK, so the basic situation is that I want to use two virtual hosts. I'm using a dynamic DNS provider, so I'm almost positive that DNS isn't the problem, and I know that it's resolving my IP because connecting to my Linux machine isn't a problem. The pertinent information from my httpd2.conf file is below (I've removed the tags around the directives and I've also replaced any "." with "," because the forum won't let me post a URL unless I have 5 posts)

NameVirtualHost *:80

VirtualHost *
ServerAdmin me@myemail,com
DocumentRoot /var/www/domain1,dnsprovider,com/public_html
ServerName domain1,dnsprovider,com
ServerAlias www,domain1,dnsprovider,com
CustomLog /var/www/domain1,dnsprovider,com/logs/access.log common
ErrorLog /var/www/domain1,dnsprovider,com/logs/error.log
/VirtualHost

VirtualHost *
ServerAdmin me@myemail,com
DocumentRoot /var/www/domain2,dnsprovider,com/public_html
ServerName domain2,dnsprovider,com
ServerAlias www,domain2,dnsprovider,com
CustomLog /var/www/domain2,dnsprovider,com/logs/access.log common
ErrorLog /var/www/domain2,dnsprovider,com/logs/error.log
/VirtualHost

For some reason, Apache serves the domain1 files when I try to access either site. I've been working on this for a while now and I've come across a few others that have had this problem, but no one seems to be able to provide a solution. I have tried every configuration I can think of to resolve this issue, but nothing seems to work at all. Depending on which combination of directives, etc. I only seem to get domain1 regardless of which site I access, get domain1 and a 400 Bad Request Error on domain2, or no page at all.

My knowledge of Linux and/or Apache is pretty limited and I'm really hoping that someone can help out here, as this issue is really driving me crazy. I've considered attempting to reinstall Apache and just start from scratch, but that always seems to be more trouble than it's worth for someone with relatively limited knowledge. So, anyone have any ideas on what's going wrong here? Any help you could give is much appreciated.
 
  


Reply


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
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
lighttpd: multiple virtual hosts? neocookie Linux - Software 8 03-27-2006 10:37 PM
Virtual Hosts with Apache noripcord7 Linux - Games 1 02-22-2004 10:33 PM
Apache 2 & Multiple Virtual Hosts hegele Linux - Networking 4 02-21-2004 06:41 PM
multiple virtual hosts iquadri1 Linux - Networking 1 09-25-2001 10:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:06 PM.

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