You are not logged in.
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
What's the output of ls /var/run/daemons?
Try /etc/rc.d/httpd restart.
no place like /home
github
Offline
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
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
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
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
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
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/httpdwill 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
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
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
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
apachectl fullstatus
apachectl configtest
apachectl restartThat should give us some output to work with.
Last edited by demian (2010-05-13 18:07:03)
no place like /home
github
Offline