Link: http://reviews.cnet.com/8301-13727_7-57481978-263/how-to-enable-web-sharing-in-os-x-mountain-lion/
1. Open the OS X Terminal
2. Create and edit an Apache user configuration file named after your user account by running the following command:
sudo nano /etc/apache2/users/`whoami`.conf
3. Copy the following text into the Terminal editor that opens, but be sure to change the "username" text to the short name of your user account:
4.
sudo apachectl start
<Directory "/Users/username/Sites/">Save and close the editor by pressing Control-O followed by Control-X.
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
4.
sudo apachectl start
sudo defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled -bool false
sudo chown root:wheel /etc/apache2/users/*
sudo chmod 644 /etc/apache2/users/*
sudo apachectl restart
5. http://127.0.0.1/~username/
沒有留言:
張貼留言