Solved

disapearing website

Posted on 2001-07-30
5
154 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
5 Comments
 
LVL 9

Accepted Solution

by:
svs earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY ABOUT ALL YOUR OPEN QUESTIONS.

Moondancer
EE Moderator
0
 

Expert Comment

by:SpideyMod
Comment Utility
Force Accepted

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now