2009-08-27

mac os x - apache2 - webpages

look at

http://www.devarticles.com/c/a/Apache/Using-Apache-and-PHP-on-Mac-OS-X/


o start Apache Web Server, you must go into the “System Preferences Control panel located on the “Apple Menu”.
 
Click on the Icon labeled "Sharing". Then locate the tab labeled  "File & Web". You will want to click the button labeled “Start” in the  "Web Sharing " section. This starts up Web sharing which starts the Apache Web Server.

Apache Web Server is now running. Easy, huh? "How can I tell?” you ask. Simple. Start up your web browser of choice. In the web address or URL part of your browser, type: "localhost" (without the double-quotes)

Ex. 
http://localhost

If everything is Okay, your browser will display the following:

"If you can see this, it means that the installation of the Apache Web server software on this system was successful. You may now add content to this directory and replace this page."
 
It worked! Hooray.
 
To access the pages of this directory, double-click on your hard drive and locate the "Library" directory. From there locate the "WebServer" directory and then the "Documents" directory where these web pages reside.
 
Note: If its not running, you either do not have web sharing enabled or   something is wrong with Apache's files. It should work right out of the box.

Since Mac OS X is a multi-user system, every person has their own account and with that brings it’s own set of web pages. To access your personal web pages you must type the following in the browser address:
 
Ex. 
http://localhost/~yourname/
To access your personal web pages, locate your account name directory under   "Users" And locate the directory labeled "Sites".

/Users/yourname/Sites/your web pages are here <---
  

No comments: