LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-26-2004, 05:27 AM   #1
BlueNoteMKVI
LQ Newbie
 
Registered: Jun 2004
Distribution: Kubuntu/CentOS
Posts: 18

Rep: Reputation: 0
Why does Apache not see my files?


I have a new webserver set up, running RedHat 9 and DirectAdmin for a control panel. I've been moving my clients over from my old server over the past week. So far it's gone well with no snags, but then tonight comes the problem.

This particular client runs an online store. I copied all of his files from the old server to the new using SCP. I then took the store offline for a few minutes while I exported the database from the old server, then imported into the new server. Database sets up just fine. Back to the old server, I change all of the DNS settings to the new IP address and it should be good to go. This is the same procedure that I've followed with a dozen other sites, most database driven, a few using the same shopping cart software.

Now it's time to test. I load up the site in a browser and see the normal black background of his index.html file. The index.html has a meta-refresh that sends the user to the directory of the store. When the meta-refresh happens, I get a 404 error on that subdirectory.

So now I'm confused. I've checked on file permissions and ownership, everything is right. If I load the site by going to www.mysite.com/~client_username/path/to/store/ it loads fine. www.clientssite.com still gives me a 404 BUT www.clientssite.com/index.html gives me...the default Apache page!

I don't know what the heck is going on. The procedure for moving the site was the same for this as it was for all of my other clients (who are operating smoothly now). The setup is the same as it is for those other clients. What the heck is going on?
 
Old 11-26-2004, 05:36 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
This sounds like you haven't set up the location correctly, in that that virtual domain is pointing to a different directory.

It could just be that you need to reload the apache server's settings:
Code:
killall -HUP httpd
The fact that www.clientssite.com doesn't read the index.html page also suggests that the index isn't looking for the .html extension. Check through your httpd.conf and compare the settings for this virtual domain (search the file for clientsite.com) and compare it with the settings for another. Change them to make them the same, then HUP httpd.

The other thing you could check is the apache's error.log and access.log files, which might give you slightly more meaningful information than just a 404 page.
 
Old 11-26-2004, 11:34 AM   #3
BlueNoteMKVI
LQ Newbie
 
Registered: Jun 2004
Distribution: Kubuntu/CentOS
Posts: 18

Original Poster
Rep: Reputation: 0
So this morning when I read your suggestion (killall -HUP httpd) I tried that and it worked fine, the site came up just great. Everything was happy for a while and then it came crashing back down.

I've checked over the httpd.conf files for both that site, and another site that should have the same setup. Both are the same except for obvious places where it says siteone.com instead of sitetwo.com.

I also checked the logs - the error log shows lots of "file not found" on favicon.ico but that's about it. Any other clues?
 
Old 11-27-2004, 06:41 PM   #4
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Code:
killall -HUP httpd
just tells Apache to re-read its configuration files.

The favicon.ico file is the standard name of an icon file that some browsers will automatically request in order to associate an icon with a web-site. (linuxquestions.org uses a penguin, for example). You can probably just ignore this (it's an Microsoft icon resource file).

If the configuration is changing over time, then it might be that you're hitting a bug in Apache, or some sort of server load limit. First make sure that you have all the Red Hat updates downloaded and installed.

Also, check what is being reported by the top command and by the /proc/meminfo file, in case there's some obvious load problem (eg. processes have a tendency to die if they run completely out of memory).
 
Old 11-27-2004, 06:54 PM   #5
BlueNoteMKVI
LQ Newbie
 
Registered: Jun 2004
Distribution: Kubuntu/CentOS
Posts: 18

Original Poster
Rep: Reputation: 0
I found the problem, it seems to be completely unrelated to this.

The site in question is on its own dedicated IP address. When I changed the DNS settings on the OLD server, I put in the default IP of the NEW server. When I went in and changed those to be the dedicated IP for that site on the new server, everything worked beautifully.

I'm still not entirely sure why I saw the right files when my box was pinging the new IP...but regardless, the problem is solved now.

Thanks for your help!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache and mpeg2 files cjstm Linux - Networking 1 11-11-2005 02:16 PM
Apache and gz files Satriani Linux - General 3 02-24-2004 06:26 AM
Apache conf files 1111 Linux - Newbie 2 07-20-2003 02:29 PM
Apache Index Files mastahnke Linux - General 7 03-20-2002 11:16 PM
perl files in apache Syncrm Linux - General 3 03-09-2002 03:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration