On 2011-09-08, at 1:01 PM, Mark Montague wrote:

> 
> Short form:  from a terminal window, try running "httpd -t" and see if it 
> reports any error in your configuration files.  Note that you might have 
> multiple versions of httpd on your system (see below) and try to invoke the 
> same version via the command line that you're trying to start via the Sharing 
> preference pane.
> 
> Here's the longer response:
> 
> 
> On September 8, 2011 12:49 , Norman Fournier <nor...@normanfournier.com> 
> wrote:
>> This is the conf file supplied with osx 10.5. The previous webserver was 
>> running on osx 10.4. This version has changed the name of the "httpd" folder 
>> to "apache2". vhosts conf files are located in a nested folder inside 
>> "apache2" called "extra".
> 
> I found this article, which says that Mac OS 10.5 ships with both Apache HTTP 
> Server 1.3 and 2.2:
> 
> http://docs.info.apple.com/article.html?path=ServerAdmin/10.5/en/c6ws10.html
> 
> Which one are you trying to run?  It seems like in a clean installation, 
> Server Admin will default to 2.2, while if you upgraded the system from Mac 
> OS 10.4, it will default to 1.3.
> 
> Note that there are different paths in each case -- including a different 
> path to the web server error log.  See the table in the above article.
> 
> Also, the latest version of Mac OS X is 10.7.1.  You may want to try 
> upgrading to something newer than 10.5.  Here is an article for 10.6, which 
> recommends the use of an Apple-provided script, translateApache.rb, to 
> convert from the old directory paths (10.4 and previous) to the newer ones 
> (10.5 and later):
> 
> http://docs.info.apple.com/article.html?path=ServerAdmin/10.6/en/wsd8cedb2f.html
> 
> 
> Also, to try and convince you that if you have an error in your httpd 
> configuration files that you should see that error in your error log, on a 
> system freshly loaded with Mac OS 10.7.1, I went to the Sharing pane in 
> System Preferences and turned Web Sharing on.  I then opened 
> http://127.0.0.1/ and got an "It works!" page from the web server running on 
> the local machine.  So far, so good.
> 
> I then ran "sudo vi /etc/apache2/httpd.conf" and added a line at the 
> beginning of the file: "This is an error".  I then turned off Web Sharing via 
> System Preferences, and turned it back on again.  When I did this, the status 
> indicator went from grey "Web Sharing: Off" to yelloe "Web Sharing 
> starting..." and then quickly back to grey "Web Sharing: off".  It did *not* 
> turn to green "Web Sharing: started" as it did when I previously started it.
> 
> I checked /var/log/apache2/error_log and was surprised to see that the web 
> server did not attempt to start.  I'm guessing that there is an 
> Apple-specific startup script that attempts to verify the web server 
> configuration before trying to start the web server.
> 
> I ran /Application/Utilities/Console.app and found the following in the 
> system log:
> 
> 2011-09-08 2:56:35.512 PM org.apache.httpd: Syntax error on line 1 of 
> /private/etc/apache2/httpd.conf:
> 2011-09-08 2:56:35.512 PM org.apache.httpd: Invalid command 'This', perhaps 
> misspelled or defined by a module not included in the server configuration
> 2011-09-08 2:56:35.525 PM com.apple.launchd: (org.apache.httpd[597]) Exited 
> with code: 1
> 2011-09-08 2:56:35.764 PM com.apple.launchd: (org.apache.httpd) Throttling 
> respawn: Will start in 10 seconds
> 
> 
> Hopefully this helps more than my previous responses.
> 
> --
>  Mark Montague
>  m...@catseye.org


Thank you Mark, your suggestions and comments were extremely helpful. I 
searched in the system logs and found an error "no listening sockets available, 
shutting down." I googled and then included Listen 80 in my httpd.conf file and 
now the server is running properly. I know this seems like a simple thing in 
retrospect but in the heat of the moment it was not so obvious.

Once again I appreciate all the time you spent to compose your emails and the 
thought you gave to your suggestions. You're a gentleman.

Norman 
---
www: http://www.normanfournier.com
facebook: http://www.facebook.com/normanfournierdotcom
linkedin: http://www.linkedin.com/profile/view?id=18127460
youtube: http://www.youtube.com/user/normanfournier



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to