Results 1 to 10 of 16
-
17th May 2011, 01:51 PM #1OPMemberWebsite's:
satiq.netCheck if Apache is ON
Hi, I'm looking for a script to put on crontab that check if my domain is on, otherway it restart apache.
Sometimes my apache get freeze and I need to manually restart it.
I found many scripts that check if httpd is running, but in my case apache is working but none can connect to it.
How can I check if it's working and I can connect to my web pages?
My actually code is:
Code:#!/bin/bash # Apache Process Monitor # Restart Apache Web Server When It Goes Down # ------------------------------------------------------------------------- # Copyright (c) 2003 nixCraft project <http://cyberciti.biz/fb/> # This script is licensed under GNU GPL version 2.0 or above # ------------------------------------------------------------------------- # This script is part of nixCraft shell script http://en.wikipedia.org/wiki/Shell_script collection (NSSC) # Visit http://bash.cyberciti.biz/ for more information. # ------------------------------------------------------------------------- # RHEL / CentOS / Fedora http://en.wikipedia.org/wiki/Fedora Linux restart command RESTART="/sbin/service httpd restart" # uncomment if you are using Debian / Ubuntu Linux #RESTART="/etc/init.d/apache2 restart" #path to pgrep command PGREP="/usr/bin/pgrep" # Httpd daemon name, # Under RHEL/CentOS/Fedora it is httpd # Under Debian 4.x it is apache2 HTTPD="httpd" # find httpd pid $PGREP ${HTTPD} if [ $? -ne 0 ] # if apache not running then # restart apache $RESTART fi
skinner Reviewed by skinner on . Check if Apache is ON Hi, I'm looking for a script to put on crontab that check if my domain is on, otherway it restart apache. Sometimes my apache get freeze and I need to manually restart it. I found many scripts that check if httpd is running, but in my case apache is working but none can connect to it. How can I check if it's working and I can connect to my web pages? My actually code is: Rating: 5
-
17th May 2011, 05:47 PM #2MemberWebsite's:
felonygames.comWhy is Apache freezing on your server? This seems more like a duct tape fix. I would consider seeing what is causing your apache to stop responding, so you can render this method obsolete..
-
17th May 2011, 06:03 PM #3BannedWebsite's:
KWWHunction.comYou can use the script my friend coded here http://static.webden.org/
-
17th May 2011, 06:27 PM #4MemberWebsite's:
ultratechhost.comthe script used by DLow is an open source script which can be found at: http://www.serviceuptime.com/psc/index.php
Direct Link to the script
Code:http://www.serviceuptime.com/downloads/phpSiteCheck.zip
-
17th May 2011, 07:52 PM #5OPMemberWebsite's:
satiq.netHow can I check? In error log I don't see any specific error..
For example, I had just 1 hour downtime but it's gone online by itself.. I didn't restart apache..
-
17th May 2011, 07:56 PM #6It begins...
Does your site stream or offer files for download?
-
17th May 2011, 07:58 PM #7OPMemberWebsite's:
satiq.netNo, only 1 blog and 1 forum...
-
17th May 2011, 08:03 PM #8It begins...
What you describe sounds more like your server/cpu gets tied up on a process to the point where it cannot serve httpd processes; thus the temporary downtime/freeze.
-
17th May 2011, 08:42 PM #9OPMemberWebsite's:
satiq.netHow can I monitor what process freeze apache?
Edit: But if I restart apache, all come back normal.. maybe it's apache itself that for some reason (too much connections? too much requests?) get high cpu and freeze...
-
17th May 2011, 09:05 PM #10MemberWebsite's:
felonygames.com
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
Apache 2.2.X or 2.4.X
By comeback in forum Hosting DiscussionReplies: 3Last Post: 4th Oct 2012, 11:43 AM -
Do you know How to Check LiteSpeed Apache ?
By ronimmi in forum Hosting DiscussionReplies: 5Last Post: 28th Jun 2012, 04:00 AM -
How to Upgrade Apache 2.2.3 to 2.2.21 ?
By feronso in forum Server ManagementReplies: 8Last Post: 17th Dec 2011, 08:44 AM -
php/apache help
By HixxoHosting in forum Web Development AreaReplies: 2Last Post: 28th Apr 2011, 05:00 PM -
Install Apache and PHP
By VAHID in forum Server ManagementReplies: 3Last Post: 10th Jan 2011, 08:46 AM
themaCreator - create posts from...
Version 3.45 released. Open older version (or...