LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-06-2007, 06:23 PM   #1
noobinacan
LQ Newbie
 
Registered: Sep 2006
Posts: 7

Rep: Reputation: 0
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.
 
Old 02-06-2007, 07:05 PM   #2
xjlittle
Member
 
Registered: Aug 2003
Location: Indiana
Distribution: fc6 sles9 & 10 kubuntu ubuntu-server
Posts: 240
Blog Entries: 2

Rep: Reputation: 30
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:~ #
 
Old 02-06-2007, 07:24 PM   #3
noobinacan
LQ Newbie
 
Registered: Sep 2006
Posts: 7

Original Poster
Rep: Reputation: 0
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 ~]$

Last edited by noobinacan; 02-06-2007 at 07:41 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems getting a startup script starting at the correct time BrianK Suse/Novell 3 11-13-2005 05:15 AM
Starting httpd: /usr/sbin/httpd: symbol lookup error: /usr/local/lib/libaprutil-0.so. bijuhpd Linux - Newbie 1 10-30-2005 05:07 PM
help, terrable problems about read-only mounting when starting my system Snerkel Linux - Software 3 01-21-2005 01:25 PM
Starting httpd-2.0.47-8 sthf Red Hat 3 11-03-2003 12:28 PM
starting httpd hrishikesh Linux - Software 4 08-29-2003 09:45 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration