Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apachectl utility weirdness

Status
Not open for further replies.

2sharp

Programmer
Jul 21, 2003
1
US
Hi all, am running OS X with it's built in apache webserver. I can start and stop apache from system preferences just fine, but in my attempt to learn a little more about the command line I tried restarting it with the /usr/sbin/apachectl utility, and this is what I got:

[Jons-G4:~] jon% /usr/sbin/apachectl restart
/usr/sbin/apachectl restart: httpd not running, trying to start
Processing config directory: /private/etc/httpd/users
Processing config file: /private/etc/httpd/users/beck.conf
Processing config file: /private/etc/httpd/users/jon.conf
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

so to see if I could open the error_log I did:

[Jons-G4:~] jon% tail /private/var/log/httpd/error_log
[Sun Jul 20 20:11:30 2003] [error] [client 127.0.0.1] File does not exist: /Library/WebServer/Documents/asp/stat.asp
[Sun Jul 20 20:12:05 2003] [error] [client 127.0.0.1] File does not exist: /Library/WebServer/Documents/asp/stat.asp
[Sun Jul 20 20:12:28 2003] [error] [client 127.0.0.1] File does not exist: /Library/WebServer/Documents/asp/stat.asp
[Sun Jul 20 20:30:41 2003] [notice] caught SIGTERM, shutting down
Processing config directory: /private/etc/httpd/users
Processing config file: /private/etc/httpd/users/beck.conf
Processing config file: /private/etc/httpd/users/jon.conf
[Sun Jul 20 20:30:46 2003] [notice] Apache/1.3.27 (Darwin) PHP/4.1.2 configured -- resuming normal operations
[Sun Jul 20 20:30:46 2003] [notice] Accept mutex: flock (Default: flock)
[Sun Jul 20 20:51:54 2003] [notice] caught SIGTERM, shutting down

which has quite correctly given me the last ten entries of error_log.

Does anyone have any ideas why the apachectl utility doesn't seem to be working?

I recently had to run the Repair Disk Permissions utility - which resets all permissions back to factory defaults?

Could this have screwed it?

2sharp
 
that might have screwed it up, I would recommend just renaming the error_log file and let apache create a new one. then you can compare the permissions and group/owner to see what's different

Apache runs as a different user than your logon ID .. it's set in http.conf

Good luck
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top