Jump to content

Apache configured, doesn't start at boot (solved)


Fanless
 Share

Recommended Posts

hello,

I've installed apache on mandriva 2008, but although I have configured it with Mandriva control center to start at boot, it doesn't want to start.

however, when I login into a session after reboot, I can start it manually, with /etc/init.d/httpd start or within the control center, and there is no error.

 

network service is running.

 

I have seen on another forum people that have the same problem.

 

can anybody help ?

 

thanks.

 

:wall:

Edited by Fanless
Link to comment
Share on other sites

Welcome to the board :beer:

 

Can you post the output from a console window for:

 

chkconfig --list | grep :on | grep -i httpd

 

this will help us see what runlevel its enabled for, also type:

 

runlevel

 

from command prompt so we can see what runlevel you are using when system is booted.

Link to comment
Share on other sites

hi ianw1974,

 

thank you for your reply

 

the command you ask me to call doesn't return any information (are you sure of the syntax ?). I have tried this:

 

[root@vialinux ~]# chkconfig --list httpd

httpd 0:arrêt 1:arrêt 2:arrêt 3:marche 4:arrêt 5:marche 6:arrêt

 

[root@vialinux ~]# runlevel

N 5

since my post, I have made some investigations to try to find some log informations, I have added a trace for start and stop cases into /etc/int.d/httpd script file :

echo "Jlb: start httpd +++++ ";

and after searching such text into all /var/log files, I found this in prcsys.log :

 

Jlb: start httpd +++++

Starting httpd: [sun May 04 09:42:27 2008] [crit] (EAI 9)Address family for hostname not supported: alloc_listener: failed to set up sockaddr for 0.0.0.0

Syntax error on line 179 of /etc/httpd/conf/httpd.conf:

Listen setup failed

 

and here is what is in /etc/httpd/conf/httpd.conf at line 179 (I think that this is what is in the file when mandriva has downloaded the apache RPM package):

 

Listen 0.0.0.0:80

 

I tried this, it doesn't work better :

Listen 127.0.0.1:80

 

then I replaced that line by :

Listen 80

and now my httpd starts well at boot !

Maybe I don't well unsdertand the purpose of that instruction. And what is curious is that the service fails to start in boot phase, but starts without any error message in manual mode.

 

I also needed to add the following line in httpd.conf (otherwise an error occured too):

 

ServerName myserver.domaine.com

 

here is what is in my host file (is it correct ?):

 

127.0.0.1 vialinux localhost

127.0.0.2 myserver.domaine.com domaine

 

I'm just starting with linux, after many disapointments with opensuze, ubuntu, debian, but I can say that Mandriva seems easier to setup, for example I have never been able to correctly install MySQL + MySQL_administrator + MySQL_query_browser on open suze, even with the RPM files.

 

There still subsist some problems of non started services in my configuration, but for the moment I'm not concerned by these services. Each problem at a time.

:)

bye

Link to comment
Share on other sites

It didn't give any results, because it was looking for :on and since you are not using English language, that is why it failed.

 

If it had been replaced with the translated version of :on in your language, then it would have yielded results. I'm therefore assuming "marche" is the equivalent of "on" since it's listed against runlevels 3 and 5 which are normal runlevels.

 

It seems your apache config was incorrect and causing the issue perhaps, since changing that port line solved the problem.

Link to comment
Share on other sites

ok, here is the same result for the command. on is marche, yes. I'll remember this for next problem.

thanks for your reply.

 

[root@vialinux ~]# chkconfig --list | grep :marche | grep -i httpd

httpd 0:arrêt 1:arrêt 2:arrêt 3:marche 4:arrêt 5:marche 6:arrêt

[root@vialinux ~]#

:thumbs:

Link to comment
Share on other sites

What the command does is filter for the httpd service and that it is on/marche. Therefore, if you don't see any results with that command, it is either:

 

1. httpd service doesn't exist.

2. on/marche is set to off/arret.

 

So, if you do the filter with just grep -i httpd and not the on/marche filter, then if it appears, you'll know that the service wasn't enabled. If nothing appears the second time, then that would mean either the service is not called httpd or Apache isn't installed.

 

But glad it's working now :thumbs:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...