Wednesday, June 5, 2013

Apache Server on Mac OS 10.8

The Apache server is available on Mac by deploying your html pages to:

/Library/WebServer/Documents/

uki:Documents uki$ ls -alt /Library/WebServer/Documents/
total 80
...
-rw-r--r--  1 root  wheel   3726 Aug 24  2012 PoweredByMacOSX.gif
-rw-r--r--  1 root  wheel  31958 Aug 24  2012 PoweredByMacOSXLarge.gif
uki:Documents uki$

You start the Apache server by:
$ sudo apachectl start


Re-deploying your code:
remove old:
$ sudo rm -r /Library/WebServer/Documents/my_project
Make directory:
$ sudo mkdir /Library/WebServer/Documents/my_project
copy new code in:
$ sudo cp -r /Users/uki/Documents/workspaces/.../my_project/* /Library/WebServer/Documents/my_project

you can view your local server at:
http://localhost/