Solved

disapearing website

Posted on 2001-07-30
5
165 Views
Last Modified: 2010-03-04
I have a redhat 6.2 box running apache with 6 or so websites on it.

My issue is that whilst most of the time, the webserver works fine, occasionally it "drops" a website and shows the default website instead.

I have copied and pasted a section from the httpd.conf file, in this example www.acme.co.uk would occasionally not show the documents from /home/acme.com, instead from the default website.
Other websites defined after acme.co.uk work fine.
Stopping and starting the apache daemon fixes the problem for another couple of weeks.

I don't even know where to start to look to fix this, can someone help!



<VirtualHost www.acme.com>
ServerAdmin root@acme.com
DocumentRoot /home/acme.com
ServerName www.acme.com
TransferLog logs/acme.com-access_log
ErrorLog logs/acme.com-error_log
</VirtualHost>

<VirtualHost www.acme.co.uk>
ServerAdmin root@acme.com
DocumentRoot /home/acme.com
ServerName www.acme.co.uk
TransferLog logs/acme.com-access_log
ErrorLog logs/acme.com-error_log
</VirtualHost>

<VirtualHost www.anothersite.com>
ServerAdmin root@anothersite.com
DocumentRoot /home/anothersite.com
ServerName www.anothersite.com
TransferLog logs/anothersite.com-access_log
ErrorLog logs/anothersite.com-error_log
</VirtualHost>
0
Comment
Question by:diaxos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 9

Accepted Solution

by:
svs earned 50 total points
ID: 6384217
Replace host names with IP addresses in <VirtualHost>
directives, as recommended in Apache manual:
http://httpd.apache.org/docs/dns-caveats.html
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6402209
This question was LOCKED with a PROPOSED ANSWER and awaits your decision today.  Once a question is LOCKED with a Proposed Answer, few new experts will step in to help on that question, since the assumption is, you've been helped.  If the Proposed Answer helped you, please accept it and award that expert.  If it did not help you, please reject it and add comments as to status and what else is needed.
 
If you wish to award multiple experts, just comment here with detail, I'll respond as soon as possible.  As it stands today, you asked the question, got help and not one expert was awarded for the contribution(s) made.  Your response is needed.  I'll monitor through month end, and if you've not returned to complete this, we'll need to decide.  Expert input is welcome (as always) to determine the outcome here if the Asker does not respond.
 
Your response in finalizing this (and ALL) your question(s) is appreciated.
 
Moondancer
Community Support Moderator @ Experts Exchange

0
 
LVL 6

Expert Comment

by:kahlean
ID: 6492267
If all the addresses shares the same ip place a NameVirtualHost on top before any virtual host line.

NameVirtualHost <--your ip comes in here -->

<VirtualHost www.acme.com>
ServerAdmin root@acme.com
DocumentRoot /home/acme.com
ServerName www.acme.com
TransferLog logs/acme.com-access_log
ErrorLog logs/acme.com-error_log
</VirtualHost>

<VirtualHost www.acme.co.uk>
ServerAdmin root@acme.com
DocumentRoot /home/acme.com
ServerName www.acme.co.uk
TransferLog logs/acme.com-access_log
ErrorLog logs/acme.com-error_log
</VirtualHost>

<VirtualHost www.anothersite.com>
ServerAdmin root@anothersite.com
DocumentRoot /home/anothersite.com
ServerName www.anothersite.com
TransferLog logs/anothersite.com-access_log
ErrorLog logs/anothersite.com-error_log
</VirtualHost>

Alternatively you can place the ip on each every site like svs mention

Regards
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6861446
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY ABOUT ALL YOUR OPEN QUESTIONS.

Moondancer
EE Moderator
0
 

Expert Comment

by:SpideyMod
ID: 8297307
Force Accepted

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Schedule a Tour of the ATEN booth at InfoComm 2017

Tour the ATEN booth to see the the Latest Addition to the Modular Matrix Switch Series, New 4K HDMI Over IP Extender and more! Enter ATEN's Ultimate Giveaway Sweepstakes for a chance to win one of several great prizes, including an ATEN US7220 2-Port Thunderbolt 2 Sharing Switch!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question