Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Please help me get Apache going again!

Please help me get Apache going again!
Thread Tools
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jun 9, 2005, 02:54 PM
 
Hi,

For some reason Apache has spontaneously decided to strike...

When I try to start websharing from system prefs the button just grays out and teh thing spins its wheels indefinitely.

This is what I get in the terminal:

SimonMartins-Computer:~ simon$ apachectl start httpd
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/xxx.conf
Processing config file: /private/etc/httpd/users/xxx.conf
Processing config file: /private/etc/httpd/users/xxx.conf
Processing config file: /private/etc/httpd/users/xxx.conf
Processing config file: /private/etc/httpd/users/xxx.conf
Processing config file: /private/etc/httpd/users/simon.conf
[Thu Jun 9 20:18:00 2005] [warn] module php4_module is already loaded, skipping
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl start: httpd could not be started
usage: /usr/sbin/apachectl (start|stop|restart|fullstatus|status|graceful|con figtest|help)

start - start httpd
stop - stop httpd
restart - restart httpd if running by sending a SIGHUP or start if
not running
fullstatus - dump a full status screen; requires lynx and mod_status enabled
status - dump a short status screen; requires lynx and mod_status enabled
graceful - do a graceful restart by sending a SIGUSR1 or start if not running
configtest - do a configuration syntax test
help - this screen

SimonMartins-Computer:~ simon$ apachectl configtest
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/xxx.conf
Processing config file: /private/etc/httpd/users/xxx.conf
Processing config file: /private/etc/httpd/users/xxx.conf
Processing config file: /private/etc/httpd/users/xxx.conf
Processing config file: /private/etc/httpd/users/xxx.conf
Processing config file: /private/etc/httpd/users/simon.conf
[Thu Jun 9 20:18:52 2005] [warn] module php4_module is already loaded, skipping
Syntax OK
SimonMartins-Computer:~ simon$

I have repaired permissions and the perms on /private/var/log/httpd/error_log are the same as another computer with no apache probs.

Can anyone get me past this?

Thanks!

Simon
Get a free email address at http://www.ippimail.com and support your favorite charity without it costing you a penny.Email for the good guys!
     
Junior Member
Join Date: Nov 2004
Location: Michigan
Status: Offline
Reply With Quote
Jun 9, 2005, 04:42 PM
 
try 'sudo apachectl restart'
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jun 10, 2005, 01:34 AM
 
Originally Posted by ctlq
try 'sudo apachectl restart'
ctlq,

Thanks for your reply.

I thought I had tried this but I get:

Last login: Thu Jun 9 20:16:02 on ttyp1
Welcome to Darwin!
SimonMartins-Computer:~ simon$ sudo apachectl restart
Password:
/usr/sbin/apachectl restart: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
<snip>
Processing config file: /private/etc/httpd/users/simon.conf
[Fri Jun 10 07:23:41 2005] [warn] module php4_module is already loaded, skipping
/usr/sbin/apachectl restart: httpd started
SimonMartins-Computer:~ simon$

But http://127.0.0.1 gives a connection refused.

I don't know what's going on...

?

I just repeated things and I'm still getting:

Last login: Thu Jun 9 20:16:02 on ttyp1
Welcome to Darwin!
SimonMartins-Computer:~ simon$ sudo apachectl restart
Password:
/usr/sbin/apachectl restart: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
<snip>
Processing config file: /private/etc/httpd/users/simon.conf
[Fri Jun 10 07:23:41 2005] [warn] module php4_module is already loaded, skipping
/usr/sbin/apachectl restart: httpd started
SimonMartins-Computer:~ simon$ apachectl graceful
/usr/sbin/apachectl graceful: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
<snip>
Processing config file: /private/etc/httpd/users/simon.conf
[Fri Jun 10 07:30:33 2005] [warn] module php4_module is already loaded, skipping
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl graceful: httpd could not be started
SimonMartins-Computer:~ simon$ apachectl restart
/usr/sbin/apachectl restart: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
<snip>
Processing config file: /private/etc/httpd/users/simon.conf
[Fri Jun 10 07:30:59 2005] [warn] module php4_module is already loaded, skipping
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl restart: httpd could not be started
SimonMartins-Computer:~ simon$ apachectl start
Processing config directory: /private/etc/httpd/users/*.conf
<snip>
Processing config file: /private/etc/httpd/users/simon.conf
[Fri Jun 10 07:32:08 2005] [warn] module php4_module is already loaded, skipping
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl start: httpd could not be started
SimonMartins-Computer:~ simon$ apachectl restart
/usr/sbin/apachectl restart: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users/*.conf
<snip>
Processing config file: /private/etc/httpd/users/simon.conf
[Fri Jun 10 07:32:58 2005] [warn] module php4_module is already loaded, skipping
fopen: Permission denied
httpd: could not open error log file /private/var/log/httpd/error_log.
/usr/sbin/apachectl restart: httpd could not be started
SimonMartins-Computer:~ simon$

I don't know why it reported that httpd had started...

Any ideas?

Simon
(Last edited by simonmartin; Jun 10, 2005 at 01:41 AM. )
Get a free email address at http://www.ippimail.com and support your favorite charity without it costing you a penny.Email for the good guys!
     
Junior Member
Join Date: Nov 2004
Location: Michigan
Status: Offline
Reply With Quote
Jun 11, 2005, 10:48 AM
 
well it looks like the first command you did worked so I'm a bit confused you said it didn't. The rest of them wouldn't work because you didn't use sudo before each one.

Re-run the command I posted above (actually sometimes I have to re-run it twice) and try: http://localhost/simon/
I think http://localhost/[username] is the normal location for os x (although I'm not 100% sure cause I've always changed it before ever using it). If that's not it also try http://localhost/sites/simon/

If this doesn't work post your /private/etc/httpd/httpd.conf and /private/etc/httpd/users/simon.conf files somewhere and I'll take a look.
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jun 11, 2005, 03:37 PM
 
Originally Posted by ctlq
well it looks like the first command you did worked so I'm a bit confused you said it didn't. The rest of them wouldn't work because you didn't use sudo before each one.

Re-run the command I posted above (actually sometimes I have to re-run it twice) and try: http://localhost/simon/
I think http://localhost/[username] is the normal location for os x (although I'm not 100% sure cause I've always changed it before ever using it). If that's not it also try http://localhost/sites/simon/

If this doesn't work post your /private/etc/httpd/httpd.conf and /private/etc/httpd/users/simon.conf files somewhere and I'll take a look.
ctlq,

Please see PM just sent.

Thanks mate

Simon
Get a free email address at http://www.ippimail.com and support your favorite charity without it costing you a penny.Email for the good guys!
     
Fresh-Faced Recruit
Join Date: Jul 2005
Status: Offline
Reply With Quote
Jul 16, 2005, 09:50 AM
 
I had the same problem "httpd: could not open error log file /private/var/log/httpd/error_log."
mine was solved by:
sudo mkdir /private/var/log/httpd
after that apache would start
     
Mac Enthusiast
Join Date: May 2001
Status: Offline
Reply With Quote
Jul 16, 2005, 11:52 AM
 
Originally Posted by mvasilakis
I had the same problem "httpd: could not open error log file /private/var/log/httpd/error_log."
mine was solved by:
sudo mkdir /private/var/log/httpd
after that apache would start
mvasilakis,

Thanks for that. I got it started again by deleting some custom stuff in httpd which wasn't a problem previously.

I'll keep a note of your solution in case it happens again... :-)

Simon
Get a free email address at http://www.ippimail.com and support your favorite charity without it costing you a penny.Email for the good guys!
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:15 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2