Totally fried my Server Apache Install - Help

blazingbiz

Verified User
Joined
Mar 19, 2005
Messages
49
Location
San Jose CA
Hi Group,

It started out uploading a php shopping cart script that needed to use Php 5, then I got into updating everything on my server using SSH.

At first things were going fine, I yummed my OS to the most updated, then installed Php 5, but the scripts wouldn't work so I decided to update to the latest version of Apache. I got some hang ups so I tried different how tos from the DA update forum, plus FAQ from my server provider. What ended up happening was that I installed multiple conflicting versions of Apache with multiple conf files, so now my web sites don't show up at all. Since I'm so deep into this I need a way of cleaning everything out for sure and installing one clean and properly confiured Apache 2.2.3 that has Php 5 working, without adding any more problems.

Your help in a step by step way of doing this is much appreciated.

Thanks
 
Reply to smtalk

I'll sign on to my IM in an hour, if I don't respond leave an IM message and I will get to it a little later. I have to an appointment coming in so I might not get to it right away.

Thanks
 
Update with more information

I'm a newbi and I tried to update my server which is running CentOS 4.1 to Php5 and Apache 2.2.3 I read and followed the instructions here in this forum with the ./ build commands and I also followed instructions on my hosting company's knowledgebase and another DA thread that essentially installed Php5 and Apache 2.2.3 manually the traditional way. I just followed both procedures and I did the manual way twice because my httpd wasn't showing up anymore.

I did the manual install of Php5 and the manual wget of apache-httpd2.2.3 using make and make install first, then the customapache ./ build methods, then the manual wget of apache-httpd2.2.3 using make and make install twice more because things were not working right.

Needless to say, my httpd is down and has been down since I did this. What is worse is that I cannot log in to my server now using SSH and putty, I get "Server unexpectedly refused connection" and then click ok and putty shows "inactive" and then shuts down.

Any suggestions about what to do at this point? Also if I get my server back up, how can I make sure I get Php5 and apache2.2.3 working right on my DA/CentOS server with the latest version of DA. I had just figured out that I needed to update my DA version before all this happened. I was running 1.23.6 I think. When I try to manually do this from the Admin CP, I got an error about my license not being valid. It expires every month along with my hosting payment billing cycle I think. How can take care of the updating of my license and DA version once my server and everything is back up?

I think the solution is to uninstall everything and clean out all my php and apache installs, then use the da customapache build script method to install everything correctly just once. If anyone can offer me the commands to do this I'd appreciate it. Also if I can get to upgrade to php5.1.6 and apache2.2.3 that would be great.
 
My suggestions, if there is not anything on there you can not live without have the DC reimage the drive. Then hire someone to make the upgrades to the versions you want.

Make sure you watch some TV while the upgrades are being done ;)
 
Reply to Skippy's post

I thought about that, but since everything on my server is fine except for apache and maybe the php config, that would definately be overkill.

Isn't there a way to uninstall packages in Linux, like an unmake command to clean everything out after installing a package file?

All I need is to undo the installs I made and clean out the config files of them, so I can start over with a clean server and DA without apache and php5 and then use the customapache build method outlined in the other thread to install everything and have it have the correct config.

After doing this yesterday, I figured out how to do it, the problem is that there are so many posts saying do it this way and do it that way and none of them really say don't do this if already did that and there isn't one clear way of doing it that is the standard as presented - that I did it a couple of ways and what happened is that my config is confused as to which one to implement and the lcoation of the files of the one httpd I want being used.

So the best way to fix that is to undo all of of what I did yesterday and do one method and go with that. The one that seems to be the default way to do it is the customapache build way.
 
Update to my Server

Ok I redid the ./build in customapache and that got my apache up again, how do I point the www part to the location of my public_html to show my web pages?
 
Sounds like your /etc/httpd/conf/httpd.conf file may have been overwritten. See if a backup one exists there. If not, you may want to just do a
Code:
wget [url]http://files.directadmin.com/services/customapache/httpd.conf[/url] -O /etc/httpd/conf/httpd.conf
cd /usr/local/directadmin/customapache
./build convert
That should get you a fresh httpd.conf and tell directadmin to convert it the Apache2 format.
 
Got it Apache 2.2.3

Thanks for you help, so far I have the server up to 2.2.3 I did the configuration like you said to do. Now instead of the Apache home page I get a white page that says It Works!

Any ideas?
 
If this is your main page for the IP address, then you will need to make sure your DocumentRoot declared in /etc/httpd/conf/httpd.conf is pointing the correct directory (/var/www/html). If it is a named virtual host, then you need to make sure you have all the:
Include /usr/local/directadmin/data/users/${user}/httpd.conf
lines at the end of the conf file.
 
The includes are at the end of the conf

The includes are there and I changed the Doc root to the default "/var/www/html"

Still the It works page appears. I'm going to check the conf files the includes point to and see that says anything.
 
The includes should set the DocumentRoot for each named virtual host. I assume you restarted apache. The other thing that bites me every once in a while, is that an index.html(.[en|es|jp|...) will be used before an index.php or index.cgi. You might just be picking up the wrong start page.
 
I did check the conf files

I checked all the conf files, the main one and the user ones and they are all set up correctly pointing to the right places.

the includes are there in the main one.

Is there something I should check in the Virtual Host tags?

I am able to ftp to my site using Filezlla just fine, I don't think I have an index,html up on my main site.

I do restart and relaod my apache everytime I make changes.

Any ideas?
 
Try looking at your apache log files, and see where it is serving that file from. That should tell you where to look.
 
looking at access log

Ok I'm looking at my access_log in the /var/log/httpd/ directory what do I look for that would help me locate the fix for this?

thanks
 
I would look at your error_log file. If there is nothing in there, then try accessing your site and requesting a page that doesn't exist, (i.e. http://sitename/adfadfadf) then look in the error_log file for that request, it should say something similar to:
Code:
[Wed Oct 18 08:29:21 2006] [error] [client 64.4.8.136] File does not exist: /var/www/html/adfadfadf
And if that file is pointing to a path you did not set as your DocumentRoot, then I would start searching your conf files for that directory.
 
Response from error log

Thanks a lot this helps quite a bit. I went to my error log and these are the last three lines:

<pre>[Tue Oct 17 23:57:29 2006] [error] [client 66.249.65.234] File does not exist: /var/www/html/manual/mod/mod_log_config.html
[Tue Oct 17 23:57:29 2006] [warn] [client 66.249.65.234] mod_include: Options +Includes (or IncludesNoExec) wasn't set, INCLUDES filter removed
[Wed Oct 18 00:11:01 2006] [notice] caught SIGTERM, shutting down</pre>

Also the dates and time stamp is from last night and today early in the morning, I have been accessing my site later than that and no error log entires.
 
Try looking in your /var/log/httpd/domains directory. Do a
Code:
ls -ltr
and look at the last error log file there. That is most likely the one you are hitting.
 
I did the ls -ltr

Hi I did that and I get a list of error logs the last two entries are the only two web sites I have on my server and the date is correct it has a bytes extension on them. Here is the out put:


-rw-r--r-- 1 root root 0 Oct 18 00:10 web-host-site.com.bytes

-rw-r--r-- 1 root root 0 Oct 18 00:10 mcgillteak.com.bytes


What can I do now?
 
Back
Top