Results 1 to 10 of 13
Hi all,
Real newbie to all of this and im having problems getting the httpd service to start. Instead of clearing my log files in var/log i accidently did a ...
- 02-26-2011 #1Just Joined!
- Join Date
- Feb 2011
- Posts
- 9
httpd wont start - log files deleted
Hi all,
Real newbie to all of this and im having problems getting the httpd service to start. Instead of clearing my log files in var/log i accidently did a force remove command on all the log files within the log directory. I'm not unable to start my httpd service and of course unable to check my log files to see whats what.
Any ideas ?
Thanks!!
- 02-26-2011 #2
Hey Varamus,
Woops! I'm no pro, but try this out:
This should be all the necessary log files for Apache to start.Code:mkdir /var/log/httpd touch /var/log/httpd/error_log
- 02-26-2011 #3Just Joined!
- Join Date
- Feb 2011
- Posts
- 9
Hi thanks for your reply. I've actually already tried to recreating those files/folders before but it didnt solve it unfortunately... ;(
any other ideas? I'm at a complete loss here!
Thanks guys!
- 02-26-2011 #4Just Joined!
- Join Date
- Jul 2010
- Posts
- 3
Try running this to see where it fails:
sh -x /etc/init.d/httpd start
- 02-27-2011 #5Just Joined!
- Join Date
- Feb 2011
- Posts
- 1
helo varamus,
please give the error which u faced,
- 02-27-2011 #6Just Joined!
- Join Date
- Feb 2011
- Posts
- 9
thanks guys, this is the error output from said command
Code:+ . /etc/rc.d/init.d/functions ++ TEXTDOMAIN=initscripts ++ umask 022 ++ PATH=/sbin:/usr/sbin:/bin:/usr/bin ++ export PATH ++ '[' -z '' ']' ++ COLUMNS=80 ++ '[' -z '' ']' +++ /sbin/consoletype ++ CONSOLETYPE=pty ++ '[' -f /etc/sysconfig/i18n -a -z '' ']' ++ . /etc/profile.d/lang.sh +++ sourced=0 +++ for langfile in /etc/sysconfig/i18n '$HOME/.i18n' +++ '[' -f /etc/sysconfig/i18n ']' +++ . /etc/sysconfig/i18n ++++ LANG=en_GB ++++ SYSFONT=latarcyrheb-sun16 +++ sourced=1 +++ for langfile in /etc/sysconfig/i18n '$HOME/.i18n' +++ '[' -f /root/.i18n ']' +++ '[' -n '' ']' +++ '[' 1 = 1 ']' +++ '[' -n en_GB ']' +++ export LANG +++ '[' -n '' ']' +++ unset LC_ADDRESS +++ '[' -n '' ']' +++ unset LC_CTYPE +++ '[' -n '' ']' +++ unset LC_COLLATE +++ '[' -n '' ']' +++ unset LC_IDENTIFICATION +++ '[' -n '' ']' +++ unset LC_MEASUREMENT +++ '[' -n '' ']' +++ unset LC_MESSAGES +++ '[' -n '' ']' +++ unset LC_MONETARY +++ '[' -n '' ']' +++ unset LC_NAME +++ '[' -n '' ']' +++ unset LC_NUMERIC +++ '[' -n '' ']' +++ unset LC_PAPER +++ '[' -n '' ']' +++ unset LC_TELEPHONE +++ '[' -n '' ']' +++ unset LC_TIME +++ '[' -n '' ']' +++ unset LC_ALL +++ '[' -n '' ']' +++ unset LANGUAGE +++ '[' -n '' ']' +++ unset LINGUAS +++ '[' -n '' ']' +++ unset _XKB_CHARSET +++ consoletype=pty +++ '[' -z pty ']' +++ '[' -n '' ']' +++ '[' -n '' ']' +++ '[' -n en_GB ']' +++ case $LANG in +++ '[' xterm = linux ']' +++ unset SYSFONTACM SYSFONT +++ unset sourced +++ unset langfile ++ '[' -z '' ']' ++ '[' -f /etc/sysconfig/init ']' ++ . /etc/sysconfig/init +++ BOOTUP=color +++ GRAPHICAL=yes +++ RES_COL=60 +++ MOVE_TO_COL='echo -en \033[60G' +++ SETCOLOR_SUCCESS='echo -en \033[0;32m' +++ SETCOLOR_FAILURE='echo -en \033[0;31m' +++ SETCOLOR_WARNING='echo -en \033[0;33m' +++ SETCOLOR_NORMAL='echo -en \033[0;39m' +++ LOGLEVEL=3 +++ PROMPT=yes +++ AUTOSWAP=no ++ '[' pty = serial ']' ++ '[' color '!=' verbose ']' ++ INITLOG_ARGS=-q ++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpms ave\)$/d' + '[' -f /etc/sysconfig/httpd ']' + . /etc/sysconfig/httpd + HTTPD_LANG=C + INITLOG_ARGS= + apachectl=/usr/sbin/apachectl + httpd=/usr/sbin/httpd + prog=httpd + pidfile=/var/run/httpd.pid + lockfile=/var/lock/subsys/httpd + RETVAL=0 + case "$1" in + start + echo -n 'Starting httpd: ' Starting httpd: + check13 + CONFFILE=/etc/httpd/conf/httpd.conf + GONE='(ServerType|BindAddress|Port|AddModule|ClearModuleList|' + GONE='(ServerType|BindAddress|Port|AddModule|ClearModuleList|AgentLog|RefererL og|RefererIgnore|FancyIndexing|' + GONE='(ServerType|BindAddress|Port|AddModule|ClearModuleList|AgentLog|RefererL og|RefererIgnore|FancyIndexing|AccessConfig|ResourceConfig)' + LANG=C + grep -Eiq '^[[:space:]]*((ServerType|BindAddress|Port|AddModule|ClearModuleLis t|AgentLog|RefererLog|RefererIgnore|FancyIndexing|AccessConfig|ResourceConfig))' /etc/httpd/conf/httpd.conf + LANG=C + daemon --pidfile=/var/run/httpd.pid /usr/sbin/httpd + local gotbase= force= nicelevel corelimit + local pid base= user= nice= bg= pid_file= + nicelevel=0 + '[' --pidfile=/var/run/httpd.pid '!=' -pidfile=/var/run/httpd.pid ']' + case $1 in + pid_file=/var/run/httpd.pid + shift + '[' /usr/sbin/httpd '!=' /usr/sbin/httpd ']' + '[' -z '' ']' + base=httpd + __pids_var_run httpd /var/run/httpd.pid + local base=httpd + local pid_file=/var/run/httpd.pid + pid= + '[' -f /var/run/httpd.pid ']' + return 3 + '[' -n '' -a -z '' ']' + corelimit='ulimit -S -c 0' + '[' -n '' ']' + '[' color = verbose -a -z '' ']' + '[' -z '' ']' + /bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; /usr/sbin/httpd' + '[' 1 -eq 0 ']' + failure 'httpd startup' + local rc=1 + '[' color '!=' verbose -a -z '' ']' + echo_failure + '[' color = color ']' + echo -en '\033[60G' + echo -n '[' [+ '[' color = color ']' + echo -en '\033[0;31m' + echo -n FAILED FAILED+ '[' color = color ']' + echo -en '\033[0;39m' + echo -n ']' ]+ echo -ne '\r' + return 1 + '[' -x /usr/bin/rhgb-client ']' + return 1 + RETVAL=1 + echo + '[' 1 = 0 ']' + return 1 + exit 1Code:FAILED+ '[' color = color ']' + echo -en '\033[0;39m' + echo -n ']' ]+ echo -ne '\r'
Last edited by varamus; 02-27-2011 at 10:03 AM.
- 02-27-2011 #7Just Joined!
- Join Date
- Jul 2010
- Posts
- 3
What is the output if you run this:
/usr/sbin/httpd
- 02-27-2011 #8Just Joined!
- Join Date
- Feb 2011
- Posts
- 9
- 02-27-2011 #9Just Joined!
- Join Date
- Dec 2009
- Location
- California
- Posts
- 68
If re-creating the log files didn't seem to work, you could always go back-to-basics.... Remove and re-install the httpd package.
You don't mention your distribution, but if it's rpm-based, you could do something like:
# rpm -e httpd
# yum install httpd
- 02-27-2011 #10Just Joined!
- Join Date
- Feb 2011
- Posts
- 9
hi abarclay,
It won't let me uninstall the httpd package as i get the following:
Code:rpm -e httpd error: Failed dependencies: httpd-mmn = 20051115 is needed by (installed) mod_perl-2.0.4-6.el5.x86_64 httpd-mmn = 20051115 is needed by (installed) mod_python-3.2.8-3.1.x86_64 httpd-mmn = 20051115 is needed by (installed) mod_ssl-2.2.3-43.el5.centos.3.x86_64 httpd-mmn = 20051115 is needed by (installed) php-5.2.17-1.el5.art.x86_64 webserver is needed by (installed) webalizer-2.01_10-30.1.x86_64 httpd is needed by (installed) psa-9.2.2-cos5.build92090714.19.x86_64 httpd is needed by (installed) awstats-6.6-1.swsoft.noarch httpd is needed by (installed) psa-mod_fcgid-1.10-3.x86_64 httpd is needed by (installed) mod_bw-0.8-5.x86_64 httpd >= 2.0.40 is needed by (installed) mod_python-3.2.8-3.1.x86_64 httpd is needed by (installed) mailman-2.1.9-4.el5.x86_64 httpd = 0:2.2.3-43.el5.centos.3 is needed by (installed) mod_ssl-2.2.3-43.el5.centos.3.x86_64 httpd = 2.2.3-43.el5.centos.3 is needed by (installed) httpd-devel-2.2.3-43.el5.centos.3.x86_64


Reply With Quote
