LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 10-23-2003, 12:06 PM   #1
DigiDave
LQ Newbie
 
Registered: Sep 2003
Posts: 22

Rep: Reputation: 15
Unhappy Virtual Host Redirect Issue


This is probably a simple question but to simple for me to answer and therefore require some help.

I have set up two virtual hosts will success however when I type the URL into the browser for one I get the other But only when I type the URL in the following way.

eg: type into browser www.mydomain2.ca and you get www.mydomain1.com any the index page for my first virtual server.

type into browser mydomain2.ca you get www.mydomain2.ca the proper index page. Puzzling!!!

I know why it's happening (I think?) I has to do with the pointing but I can't figure out how to adjust Apache to correct.

Any suggestions would be appreciated. I hope to have enough experience with all of this to someday help others.

 
Old 10-23-2003, 01:40 PM   #2
schwing
LQ Newbie
 
Registered: Oct 2003
Location: Michigan, USA
Distribution: YellowDogLinux & Debian Sarge
Posts: 14

Rep: Reputation: 0
In your VirtualHost directive, check to see if you have ServerName AND ServerAlias set correctly. I use a format like:

<VirtualHost 192.168.0.10>
DocumentRoot "/usr/local/apache/htdocs/mydomain"
ServerName www.mydomain.com
ServerAlias mydomain.com
</VirtualHost>

Then don't forget to restart Apache.

HTH.
 
  


Reply



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
Virtual Host issue with apache gauge73 Linux - Networking 1 07-12-2005 02:00 PM
Apache Virtual Host problem - DNS or DHCP issue? costrevs Linux - Software 16 03-23-2005 07:50 AM
ip redirect issue loser122 Linux - Networking 1 09-30-2003 01:54 PM
Apache Virtual Host Redirect granny Linux - Networking 5 05-22-2003 01:20 PM
Apache Virtual URL Redirect nxny Linux - Software 0 07-19-2002 02:36 PM

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

All times are GMT -5. The time now is 09:55 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