• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

disapearing website

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
diaxos
Asked:
diaxos
1 Solution
 
svsCommented:
Replace host names with IP addresses in <VirtualHost>
directives, as recommended in Apache manual:
http://httpd.apache.org/docs/dns-caveats.html
0
 
MoondancerCommented:
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
 
kahleanCommented:
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
 
MoondancerCommented:
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY ABOUT ALL YOUR OPEN QUESTIONS.

Moondancer
EE Moderator
0
 
SpideyModCommented:
Force Accepted

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now