LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-28-2010, 01:06 PM   #1
agentfitz
LQ Newbie
 
Registered: Oct 2010
Posts: 5

Rep: Reputation: 1
can edit Apache virtual hosts successfully, but can't add a new one!


This really has me baffled! I'm running Apache 2.2 on Windows Server 2003 (I know, my first blunder). I can edit existing virtual hosts without a problem, for example, I can change this existing vhost to point to a different document root and it works fine:

<VirtualHost *:80>
ServerName existingsubdomain.mydomain.net
DocumentRoot "C:/Inetpub/wwwroot/mydirectory"
</VirtualHost>

But the moment I try to add a new virtual host, it doesn't get recognized! When I try to browse to it in a browser, I get a "Server not found: Firefox can't find the server at newsubdomain.mellemallc.net."

<VirtualHost *:80>
ServerName newsubdomain.mydomain.net
DocumentRoot "C:/Inetpub/wwwroot/mydirectory"
</VirtualHost>

Can anyone point me in the right direction as to why this may be happening?

Thanks,
Brian
 
Old 10-28-2010, 01:23 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,221
Blog Entries: 1

Rep: Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075
Hi,

Are you using a name server or the windows hosts file to define the hostnames?
Does newsubdomain.mydomain.net resolves to the ip of your server? Try
Code:
ping newsubdomain.mydomain.net
and see what is the IP of newsubdomain.mydomain.net
 
Old 10-28-2010, 03:36 PM   #3
agentfitz
LQ Newbie
 
Registered: Oct 2010
Posts: 5

Original Poster
Rep: Reputation: 1
oops!

What a knucklehead I am; I totally forgot that step of the process! Thank you very much for your reply bathory! That will certainly address the original issue for me.

With that said, when you mentioned pinging the site I did notice some strange behavior that I had noticed before but was never sure what the cause was - perhaps you can also help me clear this up as well.

If I open a command line and run: ping www.google.com, I get

C:\Users\Brian>ping www.google.com

Pinging www.l.google.com [66.102.7.104] with 32 bytes of data:
Reply from 66.102.7.104: bytes=32 time=71ms TTL=56
Reply from 66.102.7.104: bytes=32 time=88ms TTL=56
Reply from 66.102.7.104: bytes=32 time=46ms TTL=56
Reply from 66.102.7.104: bytes=32 time=48ms TTL=56

Ping statistics for 66.102.7.104:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 46ms, Maximum = 88ms, Average = 63ms

C:\Users\Brian>


0% loss, great! But, if I run my own site, even though I can pull it up perfectly fine in a browser, if I ping it I get:

C:\Users\Brian>ping www.mellemallc.com

Pinging mellemallc.com [208.53.1.212] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 208.53.1.212:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

C:\Users\Brian>


I'm just confused why, even though I can pull the site up fine, when I ping it, the data doesn't appear to be transferred properly. Any thoughts on this?

Thanks again for your help,
Brian
 
Old 10-28-2010, 03:50 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,221
Blog Entries: 1

Rep: Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075Reputation: 2075
Hi,

If your question is answered, you can use the "Thread Tools", to mark the thread "SOLVED".

Regarding ping, if you get no answer for a host you know is up, means that there is a firewall in between that blocks ICMP packets.

Regards
 
Old 10-28-2010, 04:10 PM   #5
agentfitz
LQ Newbie
 
Registered: Oct 2010
Posts: 5

Original Poster
Rep: Reputation: 1
solved

Perfect, that's what I needed to know. Thanks again for your help, bathory. I will mark the thread as solved.

Just to provide a bit more information for future visitors to this thread, the issue was that even though I had created a virtual host entry in the vhosts config file for Apache, I had forgotten to actually add that subdomain in my DNS management tool (through my domain name registrar) in order to ensure requests at the new subdomain were being routed to the correct IP.

Specifically, I needed to add a CNAME record for the subdomain which pointed to the @ or root host record. At that point, the request was routed to the server properly and then picked up by Apache and the new virtual host record.

Best,
Brian
 
  


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
Apache Virtual Hosts ll_oz_ll Linux - Server 3 10-23-2009 02:57 AM
apache + virtual hosts bambeklis Linux - Server 2 05-26-2008 03:40 PM
Apache Virtual Hosts jarrell Linux - Server 6 07-16-2007 11:10 AM
apache virtual hosts dana340 Linux - Newbie 4 01-26-2006 02:01 PM
Apache Virtual Hosts gbg Linux - Software 4 10-02-2003 08:35 AM

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

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