LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   httpd autostart problem. (https://www.linuxquestions.org/questions/linux-software-2/httpd-autostart-problem-798579/)

m3phisto 03-29-2010 03:01 AM

httpd autostart problem.
 
hi there

i got an apache server running on my Fedora and it works fine.

/etc/init.d/httpd start gets the server up as it should but autostart wont work...


Code:

[root@fedora mephisto]# chkconfig --list httpd
httpd          0:off  1:off  2:on    3:on    4:on    5:on    6:off


someone got an idea whats wrong?

thx for your help


edit: i run level 5!

blacky_5251 03-29-2010 03:25 AM

Check that you actually have links in /etc/rc.d/rc2.d/S85httpd etc. Please post the output from this command (run as root):-
Code:

find /etc/rc.d -name "*httpd" -print

m3phisto 03-29-2010 03:27 AM

Code:

[root@fedora mephisto]# find /etc/rc.d -name "*httpd" -print
/etc/rc.d/rc4.d/S85httpd
/etc/rc.d/init.d/httpd
/etc/rc.d/rc6.d/K15httpd
/etc/rc.d/rc0.d/K15httpd
/etc/rc.d/rc5.d/S85httpd
/etc/rc.d/rc1.d/K15httpd
/etc/rc.d/rc3.d/S85httpd
/etc/rc.d/rc2.d/S85httpd

thx for your help

blacky_5251 03-29-2010 03:29 AM

That looks fine. When the machine boots, do you see it attempting to start HTTP and it fails, or does it not appear on screen at all? (Need to go out for an hour or so soon, so might not be able to reply immediately to your answer :) )

m3phisto 03-29-2010 03:34 AM

i just found this in the boot.log

Code:

Starting httpd: [Mon Mar 29 11:57:37 2010] [warn] module fcgid_module is already                    loaded, skipping
(99)Cannot assign requested address: make_sock: could not bind to address 10.1.1                    .66:80
no listening sockets available, shutting down
Unable to open logs
                                                          [FAILED]


blacky_5251 03-29-2010 04:03 AM

Have you modified your etc/httpd/conf/httpd.conf file, or is it standard? Specifically, what does the "Listen" entry look like?

Not sure why it would start manually but not at boot time - at least it's trying though.

m3phisto 03-29-2010 04:06 AM

yes i have modified the httpd.conf becouse i run FastCGI and suExec

blacky_5251 03-29-2010 04:09 AM

So I guess the next obvious question is what happens when you use a default configuration?

m3phisto 03-29-2010 04:27 AM

i forgot to backup the default... somone got it for me?

blacky_5251 03-29-2010 04:44 AM

Perhaps save your current config files, remove httpd, and reinstall it.

bathory 03-29-2010 04:46 AM

Quote:

Starting httpd: [Mon Mar 29 11:57:37 2010] [warn] module fcgid_module is already loaded, skipping
(99)Cannot assign requested address: make_sock: could not bind to address 10.1.1 .66:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
Are you sure that the IP 10.1.1.66 is correct?
If it is, then apache tries to start before the network comes up.

m3phisto 03-29-2010 05:06 AM

@blacky_5251: can i just remove httpd and then reinstall it and it will work again if i copy my config back to it?

@bathory: yes i'm shure! otherwhise the server wouldn't start up manualy.

after apache only 2 services start up... atd and cron

--------------------------------


edit: just found somthing out...
the server starts only if i'm logged in as root

if i start apache as local user:

[Code]
[mephisto@fedora conf]$ /etc/init.d/httpd start
Starting httpd: [Mon Mar 29 12:08:45 2010] [warn] module fcgid_module is already loaded, skipping
Warning: SuexecUserGroup directive requires SUEXEC wrapper.
Warning: SuexecUserGroup directive requires SUEXEC wrapper.
(13)Permission denied: make_sock: could not bind to address 10.1.1.66:80
no listening sockets available, shutting down
Unable to open logs
[FAILED]
[Code]


the user apache runs as is "apache"

bathory 03-29-2010 05:24 AM

Quote:

edit: just found somthing out...
the server starts only if i'm logged in as root
This is normal. Apache starts as root and then drops privileges to the apache user.
Could be a SELinux problem. Try to disable it and see if it works.

m3phisto 03-29-2010 05:26 AM

Quote:

Originally Posted by bathory (Post 3916500)
This is normal. Apache starts as root and then drops privileges to the apache user.
Could be a SELinux problem. Try to disable it and see if it works.

is already disabled.

bathory 03-29-2010 05:37 AM

You can delete the httpd service from chkconfig and use /etc/rc.d/rc.local to start apache (rc.local executes after all the other startup scripts).
Just add:
Code:

/usr/sbin/apachectl start
in rc.local


All times are GMT -5. The time now is 04:30 PM.