Solved

disapearing website

Posted on 2001-07-30
5
161 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

733 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