Web Design on Apple Mac OS X

Here at Artsgraphica we design all our websites using the LAMP platform which is ideally suited for development using Mac OS X. Here are some useful hints, tips and code snippets you might find useful.

Where is the httpd.conf file on Mac OS X?

The http.conf file is located at /etc/httpd/httpd.conf but you cannot see this file in the finder as this is a hidden system file. If you are using BBedit or Textmate then turn on the option to show hidden files and then open as normal. Once you have edited the httpd.conf file you will be prompted to enter an administrator password to save. You will have to restart Apache before changes are reflected in your server settings.

How do you show hidden files in the finder?

By default system files are hidden in the finder. To show these open a Terminal window and use the commands:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

And then to hide these files again use:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

Can you install multiple versions of MySQL on Mac OSX

Yes. You can install any number of different versions of MySQL on OS X. Each different version of MySQL is stored in a different directory in /usr/local/ and referenced by a symbolic link /usr/local/mysql. To install a new version of MySQL stop your existing MySQL database server and follow the normal installation proceedure. Then create the symbolic link using the following:

ln /usr/local/mysql-standard-4.1.22-apple-dar /usr/local/mysql

Where /usr/local/mysql-standard-4.1.22-apple-dar is the path to the new version of MySQL.

Once you have done this, just restart MySQL to access the new version.