If you're wanting to do web development on your computer then you will need to set up apache web server so you can run websites locally.
For Mac
- From the Apple menu, select System Preferences
- Click “Sharing”, and then click the services tab.
- Select Personal Web Sharing, and then click the Start Button
- in your browser go to http://localhost
- You can save your files for a site at: Users Directory > Your Username (homedirectory) Sites
enable PHP
- open /etc/apache2/httpd.conf
- remove the hash from the line that reads
LoadModule php5_module - libexec/apache2/libphp5.so
- save the file, if you don't have permissions it won't allow you to save, some editors give you permissions automatically
remove your username from the url
- open /etc/apache2/httpd.conf
- change the line
DocumentRoot "/Library/WebServer/Documents" to
DocumentRoot "/Users/yourusernamehere/ Sites"
- save the file, if you don't have permissions it won't allow you to save, some editors give you permissions automatically
No comments:
Post a Comment