Apache/Web Sharing won't startup solution

terran74

The thread killer
I posted this a few weeks ago and no one responded. I wanted to start a new thread but this time make the thread subject more specific to the problem. I have heard of this problem happening more now with 10.1 out.


Original Thread: Webserver error "caught SIGTERM, shutting down"

Date 9/20/2001


Apache fails to startup solution
I know there was a previous thread on this issue and I wanted to start a new thread in the hopes of finding out what is going on.

Here is the back story: After running the 10.0.4 update and the webserver update, trying to get the webserver to start up results in it not starting up. In the System Preference panel you see "Web Server Starting up...".

If you more the /var/log/httpd/error_log file, this stands out

Processing config directory: /private/etc/httpd/users
Processing config file: /private/etc/httpd/users/user.conf
Processing config file: /private/etc/httpd/users/user.conf
Processing config file: /private/etc/httpd/users/user.conf
[Sun Sep 16 20:49:42 2001] [alert] httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sun Sep 16 20:49:42 2001] [notice] Apache/1.3.19 (Darwin) configured -- resuming normal operations
[Mon Sep 17 12:22:42 2001] [notice] caught SIGTERM, shutting down

Ok. Well the past posts have shown users reinstalling their OS to fix this problem. Initially when I first saw this, I was having other problems with my machine and I noticed it fixed the problem after I reinstalled the OS. However, after installing 10.1 5G64, the problem has popped up again for me and in 10.0.4 for another friend of mine. Rather than reinstalling MacOS I wanted to fix the problem and sought to find a solution. I succeeded.

I did find a solution and I want to know what - if anything - could happen as a result of me fixing this.

in your /private/etc/httpd directory you will see many httpd.conf files. In my case I had: httpd.conf, httpd.conf.bak, and httpd.conf.default. I copied httpd.conf to another file, copied httpd.conf.default to a new file called httpd.conf and then low and behold, I can now start my web server.

I have no idea what the differences are yet between the two conf files. I have skimmed through them but have not seen what stood out that had made any sense to me. Can someone tell me why this fixed the problem? What should I be aware of?

Please note: I have not installed anything regarding apache. I know MacOS X uses a custom apache server but seeing as I am not familiar with apache and only want to use this as a quick personal webserver I never got into that. This is the Apple branded version of apache for MacOS, no changes have been made except those that came with Apple updates.

Also note: This broke originally in 10.0.4, fixed itself after a reinstall but after upgrading to the 10.1 5G64, broke again.

hope this helps.
 

beverson

Registered
This has been driving me batty all day. I just wish I knew the CLI a little better (I guess this is how I learn it, huh?).

Again, many thanks.
 

blb

`'
Originally posted by terran74:
I have no idea what the differences are yet between the two conf files. I have skimmed through them but have not seen what stood out that had made any sense to me. Can someone tell me why this fixed the problem? What should I be aware of?
Quick tip: to find the difference between these two, run

diff httpd.conf httpd.conf.funky

In the output, lines beginning with less-than's (<) are in the first file, not the second, and lines beginning with greater-than's (>) are in the second, not first.
 
Top