How to Set Up a Test Server With Leopard
Everything you need to run a Web server on an Apple computer comes pre-installed with the Leopard operating system on the Mac. You can use a Leopard test server to host and test your website. While the server software comes pre-installed with Leopard, you need to know how to activate the server features and run it properly.
Instructions
-
-
1
Activate your Mac's root password by going to the Utilities folder and clicking "Directory Utility." Click the checkbox next to "Enable Root Password."
-
2
Insert the Mac OS 10.5 (Leopard) installation DVD into your computer. Install the Xcode Tools package.
-
-
3
Click on "Utilities" in your Finder and open the Terminal. Type "sudo nano /private/etc/apache2/httpd.conf" without quotation marks.
-
4
Search for "#LoadModule php5_module libexec/apache2/libphp5.so" in the document that will open. In Leopard, it is on line 114. Edit the text to read, "LoadModule php5_module libexec/apache2/libphp5.so" (without quotation marks!).
-
5
Search for "#Include /private/etc/apache2/extra/httpd-vhosts.conf" on line 461, and change to "Include /private/etc/apache2/extra/httpd-vhosts.conf" (without quotation marks!). Save and close the file.
-
6
Go back to the Terminal and type, "sudo nano /etc/hosts" (without quotation marks!).
-
7
Add the following text to the bottom of the file: # My sites127.0.0.1 site1
-
8
Save the file and close it. Go back to the Terminal and enter, "sudo nano /etc/apache2/extra/httpd-vhosts.conf"
-
9
Delete the example hosts that the Leopard server software has and add the following text: <VirtualHost *> DocumentRoot "/Library/WebServer/Documents" ServerName localhost</VirtualHost>
-
10
Add your Leopard test server by entering the following text: <VirtualHost *> ServerName site1 DocumentRoot /path/to/site1</VirtualHost>
-
11
Turn on the Apache server software to finish setting up your test server with Leopard. Click on the Apple menu, select "System Preferences," and turn on "Sharing."
-
12
Test your Leopard test server. Open the Web browser and navigate to http://localhost/. A Web server test page will appear. You now have a test server running with Leopard, and can edit and manage the server as you would any other server.
-
1
Tips & Warnings
You can treat the Leopard test server like any other server
For full server features, install MySQL and PHP after setting up the Leopard test server.
Enter Terminal codes accurately to avoid creating errors on your test server.