?
Solved

disapearing website

Posted on 2001-07-30
5
Medium Priority
?
172 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 200 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month9 days, 8 hours left to enroll

762 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