You are not logged in.

#1 2010-05-12 18:12:18

simoncruse
Member
Registered: 2010-05-12
Posts: 6

Help.... my friends webserver has crash and he's on holiday.

My house friends web server has crashed, i tried a reboot as i have root access via the Linux command line on my home PC.

My question is this a quick fix to starting up a web server or can anybody guide me to information that would aid me getting this web server publishing sites rather than giving 404.

I'll be honest here i am new to Linux so my knowledge is limited. Is this an easy fix as i haven't been able to contact him.

Web server setup is a standard LAMP running archlinux, not sure on kernal but the files are dated 2006.

I've had a look in the wiki and i've tried /etc/rc.d/httpd start - and it fails.

Thank you in advance for reading my question and i would be very happy to here your input.

Last edited by simoncruse (2010-05-12 18:15:23)

Offline

#2 2010-05-12 18:21:52

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: Help.... my friends webserver has crash and he's on holiday.

What's the output of ls /var/run/daemons?
Try /etc/rc.d/httpd restart.


no place like /home
github

Offline

#3 2010-05-12 18:26:31

simoncruse
Member
Registered: 2010-05-12
Posts: 6

Re: Help.... my friends webserver has crash and he's on holiday.

thanks for the speedy reply, this is my  terminal output.

[root@***** ~]# /etc/rc.d/httpd restart
:: Stopping HTTP Daemon                                                  [DONE]
:: Starting HTTP Daemon                                                  [FAIL]
[root@***** ~]#

Last edited by simoncruse (2010-05-12 18:33:23)

Offline

#4 2010-05-12 18:59:35

Stythys
Member
From: SF Bay Area
Registered: 2008-05-18
Posts: 878
Website

Re: Help.... my friends webserver has crash and he's on holiday.

you need to provide the error output for the actual command it's running. open up /etc/rc.d/httpd with vim or whatever, and run that.


[home page] -- [code / configs]

"Once you go Arch, you must remain there for life or else Allan will track you down and break you."
-- Bregol

Offline

#5 2010-05-12 19:31:34

simoncruse
Member
Registered: 2010-05-12
Posts: 6

Re: Help.... my friends webserver has crash and he's on holiday.

great replys thanks, i'll be honest i wouldn't know where to start with vim, i've tried to use gedit but it isn't installed ( i assume you meant text edit'r when you suggested vim?) . Unfortunately my basic knowledge is limited to ubuntu linux and to be fare i'm only learning novice.

Offline

#6 2010-05-12 19:39:18

Sin.citadel
Member
Registered: 2008-01-22
Posts: 267

Re: Help.... my friends webserver has crash and he's on holiday.

in your first post, you said that the site is giving you 404's, if there is a config misconfiguration, it could give you 404's, try checking the /etc/httpd/conf/httpd.conf and see if the settings are still correct,if you are not getting 404 errors maybe your friend did a system upgrade recently or apache cant find a specific module (such as php or python)

Last edited by Sin.citadel (2010-05-12 19:39:59)

Offline

#7 2010-05-12 20:32:10

simoncruse
Member
Registered: 2010-05-12
Posts: 6

Re: Help.... my friends webserver has crash and he's on holiday.

sorry not sure if its 404, when you ask for any site hosted on there it says "problem loading page: Unable to connect"
The system hasn't been updates as he is in the "if isn't broke don't try and fix it" camp.

the mail-server is also not working. I assumed the httpd.conf file would have all the correct information as it's had zero downtime or problems this year, so he has never had to talk me through how to reboot the system. Would the apache config lose setting because of a reboot?

Thanks for your reply, think this maybe a struggle due to my basic understanding of the LAMP config.

Last edited by simoncruse (2010-05-12 20:42:36)

Offline

#8 2010-05-12 21:21:35

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Help.... my friends webserver has crash and he's on holiday.

Sin.citadel - apache is not running, so the conf is not the issue.

simoncrouse - you don't need vim or any other editor.

less /etc/rc.d/httpd

will show you the details of apache's init script. Apache's logs will also be useful - they are in /var/log/httpd, and the ones with no number at the end are the current ones.

Offline

#9 2010-05-12 21:32:43

simoncruse
Member
Registered: 2010-05-12
Posts: 6

Re: Help.... my friends webserver has crash and he's on holiday.

heres the output

#!/bin/bash

# general config
. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting HTTP Daemon"
      /usr/sbin/apachectl start &>/dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      add_daemon httpd
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping HTTP Daemon"
    /usr/sbin/apachectl stop &>/dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon httpd
      stat_done
    fi
    ;;
  restart)

thanks.

Offline

#10 2010-05-12 21:41:07

simoncruse
Member
Registered: 2010-05-12
Posts: 6

Re: Help.... my friends webserver has crash and he's on holiday.

the other output is
[2006-11-06 11:28:37]: user mismatch (apache instead of nobody)
[2006-11-06 11:40:10]: user mismatch (apache instead of nobody)
[2006-12-12 13:11:45]: user mismatch (apache instead of nobody)
[2006-12-12 16:21:59]: user mismatch (apache instead of nobody)
[2006-12-12 16:22:03]: user mismatch (apache instead of nobody)
[2007-02-07 17:59:37]: user mismatch (apache instead of nobody)
[2007-03-20 15:21:23]: user mismatch (apache instead of nobody)
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
(END)

thanks.

Offline

#11 2010-05-13 00:21:36

davidm
Member
Registered: 2009-04-25
Posts: 371

Re: Help.... my friends webserver has crash and he's on holiday.

I've never encountered that error before but it looks as if it might be related to suExec?  Is this the error log you are giving us?

http://httpd.apache.org/docs/1.3/suexec.html

You might try to disable it per the instructions (check versions first?) just to see if it works.  Make sure to keep track of everything you do so that you can restore it if need be.  I would advise talking to your friend about this if at all possible.  Was the box recently upgraded or something to have caused this?

I believe you might also be able to change the user and group within the httpd.conf file or equivalent and try that instead of fully disabling suExec.

Warning: This is potentially dangerous, you should probably have some idea of what you are doing here because depending on why things were set up a certain way you might create a great security risk.

Last edited by davidm (2010-05-13 00:33:43)

Offline

#12 2010-05-13 09:04:01

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: Help.... my friends webserver has crash and he's on holiday.

apachectl fullstatus
apachectl configtest
apachectl restart

That should give us some output to work with.

Last edited by demian (2010-05-13 18:07:03)


no place like /home
github

Offline

Board footer

Powered by FluxBB