Installing Your Macintosh As A Server For Analyzing Web Pages
Installing OS X Mac as a home server for analyzing web pages has been greatly simplified since apache are readily installed in the hardware and you just have to open the control panel and press the start tab at the personal web sharing section.
Down the window you will see descriptions like:
View this computer’s website at http://10.0.1.3 or your personal website at http://10.0.1.3/~<username>/
Following any of the links opens up default web pages.
Locate the sites in /Library/Web Server/ you’ll stumble on two folders – CGI-Executables and Documents. Documents folder is situated inside your computer’s ‘home directory’ and contains various default files in different languages. They can be relocated elsewhere if you wish.
A freshly placed ‘index.html’ file in here opens when you go to http://10.0.1.3 (by default control panel can show you a different addressor). The address changes since it is actively allocated thus the best for use. Don’t forget to bookmark:
Computer name appears above the sharing control panel.
Likelihood exists that the web files either are in the main hard disk or a different one. For Macs they are not compatible with UNIX environment thus placing an alias on the site folder into the library, web Server or documents folder won’t give you access to them but you have an option of creating a UNIX alias to serve the same purpose.
Unlock terminal application inside utilities folder.
Following command line appears:
Paste the following immediately hitting return:
The command cd is for changing directory which points you to the documents folder. You can verify by typing the command:
It will list contents in the current directory
UNIX alias in the documents folder is set up by typing:
ln -s<path to your site folder><aliasname>
An example for placing private site files in a folder ownedsite above your hard disk will be:
ln -s /ownedSite ownedsite
Always ensure spacing separating alias name from the path.
Paste the following URL in your browser:
A home page of your owned site folder should be visible.
If your practice is to store your site files in an external hard disk then the path syntax is to some extent a little bit different as seen below:
ln -s /Volumes/<drivename>/ownedSite ownedsite
These are the rules to follow when crafting a UNIX alias directing to a folder on an external storage.
You can apply this to analyze behavior of your site on a working server to help you identify any filename sensitivity problems or broken links.
If you have other Macs or PCs on a local network, they can access the same URL, so you can check your pages in other browsers too. Visit http://appletonwitheaton.org.uk/ for more tips.