First off, lets explain that this is only a first attempt at getting a full Web Service up and running on Leopard (OSX 10.5). Don't expect this to be an in depth explanation of the process, it is only a step by step guide and notes as I do it myself. Being a .Net developer I can find my way around IIS without any problem and moving to Unix is a bit of leap. With luck by the time I've completed this post, both you and I will know a little more than before.
1) Starting the Apache web server on 10.5 is the easy bit, as the software is already included in your installation. Simply go to the System Preferences options from the Apple icon. Select "Sharing" from the "Internet and Network" section. Click the "Web Sharing" on and you should get a HTTP link on the right showing the IP Address of the server.
2) Clicking this link will bring up a default Apache webpage showing
"If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page."
Clicking the site http://ipaddress/~username
brings up
"Forbidden You don't have permission to access /~username/ on this server."
3) "So where are all the files then?", I asked myself. Well, after some searching I found the configuration files in the /etc/apache2 directory on the System volume. Get there using the Terminal application and edit the "httpd.conf" file. This contains all the main information information. hostname, ServerAdmin email address, IP Address, etc.
The information in this file indicated that the root directory "INETPUB/wwwroot" in Windows is located in /Library/Webserver/Documents.
4) Editing the DocumentRoot setting in the httpd.conf file moves the home directory to a new location brings up a "readonly" error in vi. The only way around this is to make the editable is to do it with increased permissions. First off I tried to do a "su root" command, only to find that this is disabled by default on my version of OSX. However, you can use the "sudo vi httpd.conf" command to open the config file with read/write access.
5) Using XCode I create a new index.html file with some text and placed it in the required directory.
6) Start/Stop the webservice and browse to the IPAddress of your server and you won't get the correct file displayed, No, for some reason you get the default Apache not configured message. After much head scratching I discovered that it will work fine if you use Local host (i.e. 127.0.0.1) as the IP address in the browser. Why? Who knows, guess its something to do with the configuration in the .conf file. However accessing the file from another browser on the LAN worked fine!
More next time ....