MAC OSX Create a symbolic link

Posted on in Environment

You have your local webserver ready, but your working project is somewhere else on your harddrive. That's a problem when you want to access this with your localhost. However it's easy to create a shortcut from your localhost directory to a new folder somewhere else.

Create a symbolic link to a new directory in place of the old one. Enter the following in the Terminal application:

ln -s [path where to] [path where from]

For example:

ln -s ~/Projects/GitProjects/SomeProject /Applications/XAMMP/htdocs/SomeProject

Setting up localhost Mac OSX

Posted on in Environment

Follow these instructions to setup your localhost on Mac OSX without installing XAMPP.

Make sure Web Sharing is enabled:
Go to System preferences > Sharing > enable Personal Web Sharing

  1. Backup httpd.conf
sudo cp /etc/apache2/httpd.conf /etc/apache2/httpd.conf.bak
  1. Open file in text editor
sudo nano /etc/apache2/httpd.conf
  1. Hit [CTRL + W] and type “DocumentRoot” (without quotes). Then hit “Enter.”

  2. Change the path to your folder

  3. Hit [CTRL + O], then hit Enter. Then, hit [CTRL + X] to exit.

  4. Restart server:

apachectl restart