LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   starting httpd during system startup - problems - HELP! (https://www.linuxquestions.org/questions/linux-software-2/starting-httpd-during-system-startup-problems-help-526210/)

noobinacan 02-06-2007 06:23 PM

starting httpd during system startup - problems - HELP!
 
When the system reboots, httpd does not startup.
Apache is running as a deamon.

I have tried the following:
1) Editing the rc.local and adding:
/etc/rc.d/init.d/httpd start
or
httpd &
or
httpd -k start

none work :(
(NOTE: rc.local works correctly as vsfptd starts up clean)

Quote:

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local

#start the webserver
#/etc/rc.d/init.d/httpd start


#start VSFTPD
/usr/local/sbin/vsftpd &
2) Here is what happens when I try that same command as root:
Quote:

[root@localhost etc]# /etc/rc.d/init.d/httpd stop
Shutting down http: [ OK ]
[root@localhost etc]# /etc/rc.d/init.d/httpd start
Starting httpd: [ OK ]
[root@localhost etc]#
3) here is what happens when I try starting up as a deamon or with -k argument
Quote:

[root@localhost ~]# httpd -k stop
[root@localhost ~]# httpd &
[1] 4350
[root@localhost ~]# service httpd status
httpd (pid 4359 4358 4357 4356 4355 4354 4353 4352 4351) is running...
[1]+ Done httpd
[root@localhost ~]#


help - please.

xjlittle 02-06-2007 07:05 PM

Quote:

[root@localhost etc]# /etc/rc.d/init.d/httpd start
Starting httpd: [ OK ]
[root@localhost etc]#
That looks to me like it's starting. Did you try

Code:

fp3la:~ # ps aux |grep http
and get an output like
Code:

apache    5855  0.0  0.9 16224 10172 ?      S    Jan04  0:28 /usr/sbin/httpd -k start
apache    7131  0.0  0.9 16300 9944 ?        S    Jan04  0:28 /usr/sbin/httpd -k start
apache  22656  0.0  0.9 16160 10072 ?      S    Jan10  0:21 /usr/sbin/httpd -k start
apache  22935  0.0  1.2 18920 12772 ?      S    Jan10  0:36 /usr/sbin/httpd -k start
apache  22979  0.0  1.2 18732 12684 ?      S    Jan10  0:30 /usr/sbin/httpd -k start
root      4859  0.0  0.0  1696  644 pts/0    S+  21:10  0:00 grep http
fp3la:~ #


noobinacan 02-06-2007 07:24 PM

thanks -
but I can start/stop httpd fine once I am logged in.
Only problem is that it does not start automatically at startup.



also - after startup, when I check status of httpd, it gives me:
[root@localhost ~]# service httpd status
httpd dead but subsys locked


---edited ---
well clearly is permissions...any ideas ?
[Ninja@localhost ~]$ /etc/rc.d/init.d/httpd start
bash: /etc/rc.d/init.d/httpd: Permission denied
[Ninja@localhost ~]$ chmod 700 /etc/rc.d/init.d/httpd
[Ninja@localhost ~]$ /etc/rc.d/init.d/httpd start
Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:81
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:81
no listening sockets available, shutting down
Unable to open logs
[FAILED]
touch: cannot touch `/var/lock/subsys/httpd': Permission denied
[Ninja@localhost ~]$


All times are GMT -5. The time now is 11:37 PM.