View previous topic :: View next topic |
Author |
Message |
Killerchronic Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 24 Apr 2007 Posts: 91 Location: UK
|
Posted: Wed Sep 08, 2010 4:42 pm Post subject: mod_cgi.so missing |
|
|
Hey
Got a bit of an interesting problem here, apache has been running fine since i reinstalled the server over a year ago. Having just installed some new software (awstats) and added some extra's to the apache configs i went to do a /etc/init.d/apache2 restart. Upon the restart though apache threw this error at me:
Code: | * apache2 has detected an error in your setup:
apache2: Syntax error on line 79 of /etc/apache2/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_cgi.so into server: /usr/lib/apache2/modules/mod_cgi.so: cannot open shared object file: No such file or directory |
After checking the location for mod_cgi.so it seems it has gone.
Now for the weird part, apache is still working, im guessing it never actually shutdown after the supposed restart. So as a quick test i re-emerged apache asssuming mod_cgi.so would get reinstalled if it was supposed to be there but this is not the case.
My questions are;
How do i get rid of this error, can i just remove the offending line in the httpd.conf? Would that cause any problems, cgi appears to be working fine.
Where did mod_cgi.so go? i've most certainly not deleted it by hand.
Is apache actually restarting when im issueing the command and the above error is just a warning?
Thanks in advance
Killer |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
AllenJB Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/147867172543a1dddabe67c.gif)
Joined: 02 Sep 2005 Posts: 1285
|
Posted: Wed Sep 08, 2010 5:57 pm Post subject: |
|
|
Two possibe causes for this error:
1) Unlikely, in this case, in my opinion: Something mod_cgi depends upon has been upgraded and mod_cgi needs to be recompiled to fix this.
2) Very likely: mod_cgi just got some changes to its useflags - make sure you have cgi and cgid in APACHE2_MODULES in /etc/make.conf. See also "emerge -pv apache". Most likely apache got updated and mod_cgi no longer exists, but you didn't update the config files correctly (using etc-update or dispatch-conf, for example), so Apache is still trying to load it.
Apache does include an internal command to test configuration, so it's possible that the init script uses this to check the configuration before stopping the existing apache instance. In this case, if the old apache had mod_cgi loaded, it would still be working, since the old instance hasn't been stopped yet. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Killerchronic Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 24 Apr 2007 Posts: 91 Location: UK
|
Posted: Mon Sep 27, 2010 2:52 am Post subject: |
|
|
AllenJB wrote: | Two possibe causes for this error:
1) Unlikely, in this case, in my opinion: Something mod_cgi depends upon has been upgraded and mod_cgi needs to be recompiled to fix this.
2) Very likely: mod_cgi just got some changes to its useflags - make sure you have cgi and cgid in APACHE2_MODULES in /etc/make.conf. See also "emerge -pv apache". Most likely apache got updated and mod_cgi no longer exists, but you didn't update the config files correctly (using etc-update or dispatch-conf, for example), so Apache is still trying to load it.
Apache does include an internal command to test configuration, so it's possible that the init script uses this to check the configuration before stopping the existing apache instance. In this case, if the old apache had mod_cgi loaded, it would still be working, since the old instance hasn't been stopped yet. |
Well seeing as there were no serious problems with the way apache was running i didn't push this. However a recent powercut has proved to answer one of my questions, apache was not restarting, upon restart nothing webserver wise worked and apache would not start. I do use cfg-update to check for similar entries etc, it shows more than etc-update and dispatch-conf. I thought i had done this properly since the last apache update but i guess not. I really should look a little more closely at the differences in conf file when it comes to this. I do run quite a custom httpd.conf so i try not to overwrite it as the final version has items that i added well over a year ago and remembering all even with my # tag comments takes some work lol
Having added your cgi + cgid entries to the /etc/make.conf and recompiling apache then updating the httpd.conf (all of which i did in one go so im unsure which worked but the combination did ) it all seems to be working as normal again.
Cheers <3
Killer
Edit: silly typo's x4 (note to self, learn to proof read :s, my excuse is its late ) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|