LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 09-02-2009, 09:15 AM   #1
~Chimera~
LQ Newbie
 
Registered: Jun 2008
Posts: 3

Rep: Reputation: 0
apache2 virtual hosting not resolving correctly


Hello,

I am running Ubuntu 8.04 as a server and this question specifically deals with apache2 (I think). I have 6 domains resolving to this server and I have virtual hosting set up and it works great. However, there are some small problems that I would like to fix and my attempts have been futile.

First, it I am attempting to reach site1 and type www.site1.com it works fine. If I type site1.com (with out the www) it goes to a generic "under construction" page (try nobledivers.com to see what I mean). This happens on all the sites. I tried making another entry in the sites-enable folder and calling the ServerName with out the www and the ServerAlias with the www (this is the opposite the other entry). Also, I pinged the site both ways and the ip address is correct so it isn't a DNS problem.

Second, if I type wow.nobledivers.com (which doesn't exist so should be redirected to the original site) it is redirected to a completely different site on the server. This one I am lost on, but again, this is a server problem and not a DNS problem (as far as I can tell).

Any help would be great. Thank you.

Chimera
 
Old 09-02-2009, 10:37 AM   #2
chaosless
LQ Newbie
 
Registered: Jul 2009
Location: Austin, Texas
Distribution: suse
Posts: 14

Rep: Reputation: 1
think i see why you get 'under construction' for nobledrivers.com but it works for www.nobledrivers.com looks like it IS a dns issue...

unless you have decided to do port 80 redirect with a router, your catchall address for nobledrivers.com goes to a different machine than www.nobledrivers.com - shown in the ping output below.

hope that helps.
/james

$ ping nobledivers.com
PING nobledivers.com (65.214.119.53): 56 data bytes
64 bytes from 65.214.119.53: icmp_seq=0 ttl=112 time=102.134 ms

$ ping www.nobledivers.com
PING www.nobledivers.com (65.214.119.51): 56 data bytes
64 bytes from 65.214.119.51: icmp_seq=0 ttl=48 time=101.920 ms
 
Old 09-02-2009, 10:08 PM   #3
spooge
Member
 
Registered: Nov 2001
Location: n chicago, IL. USA
Distribution: Slackware
Posts: 307

Rep: Reputation: 31
i use two <virtualHost> entries
using:
Quote:

ServerAlias mydomain.com

and

ServerAlias www.mydomain.com
works for me.
 
Old 09-03-2009, 12:13 PM   #4
~Chimera~
LQ Newbie
 
Registered: Jun 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks chaosless.

I went to the DNS and found that the @ symbol represents nothing in the prefix. So I changed that to resolve to the correct address. However, I think the email will be going to the wrong place (email and web hosting are done on different servers). So, does anyone know what the DNS needs as a prefix to forward the email to the correct IP? Something like mail.site.com or smtp.site.com?

Thanks for the help
 
Old 09-03-2009, 11:20 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023Reputation: 2023
You need an MX record http://www.linuxtopia.org/online_boo...bind-zone.html
 
Old 09-04-2009, 01:35 PM   #6
chaosless
LQ Newbie
 
Registered: Jul 2009
Location: Austin, Texas
Distribution: suse
Posts: 14

Rep: Reputation: 1
MX record will tell email servers from elsewhere (when trying to complete a request to you@yourdomain.com) how to find your email server.

you may also need mail.yourdomain.com so to configure your own email client with the right address for getting/sending email.
 
  


Reply

Tags
apache2


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
How does apache2 virtual hosting work? SimbaSpirit Linux - Software 1 06-08-2008 09:05 PM
Localhost not resolving correctly SimbaSpirit Linux - Newbie 48 02-10-2008 01:15 AM
My hostname is NOT resolving correctly cucolin@ Linux - Networking 5 08-29-2007 10:22 AM
apache2 virtual hosting ignores ServerName gjmwalsh Linux - Software 2 07-18-2006 04:31 PM
Virtual Hosting, Resolving & Redirecting URLs Dannyt Linux - General 1 10-10-2003 12:55 PM


All times are GMT -5. The time now is 09:21 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration