Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-28-2010, 01:06 PM
|
#1
|
LQ Newbie
Registered: Oct 2010
Posts: 5
Rep:
|
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
|
|
|
10-28-2010, 01:23 PM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,221
|
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
|
|
|
10-28-2010, 03:36 PM
|
#3
|
LQ Newbie
Registered: Oct 2010
Posts: 5
Original Poster
Rep:
|
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
|
|
|
10-28-2010, 03:50 PM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,221
|
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
|
|
|
10-28-2010, 04:10 PM
|
#5
|
LQ Newbie
Registered: Oct 2010
Posts: 5
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 07:11 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|