![mac os x apache config mac os x apache config](https://s1.manualzz.com/store/data/037742306_1-87fbff0a08e4a2f875e805bf798596f8.png)
You are now ready to put files to ~/Sites/ folder and when you go to: you will see those files appear, and if you add a. When it comes to PHP development on Mac OS X, Ive always battled my way through getting Apache, MySQL, and PHP on the Mac to work the way I needed them to.
![mac os x apache config mac os x apache config](https://i.ytimg.com/vi/POIcWsxWRPc/maxresdefault.jpg)
We still need to enable personal websites by uncommenting line 173, so type 173G and press return, then type an x over the to delete it.The same must be done with line 513 of the file type 513G and press return, then type an x over the to delete it. To save your changes in the editor, type :w. Then restart apache: sudo apachectl restart Editing the Apache configuration file in the vi editor. In the same file, under the section look for:Īlso edit this file: sudo vim /etc/apache2/users/nfĪnd look for the same line AllowOverride None** and change it to *AllowOverride All I prefer to have it there, as I do not need root permissions to add content to that folder. Of course instead of your-username insert there your real username.
![mac os x apache config mac os x apache config](https://cdn.crunchify.com/wp-content/uploads/2015/06/Setup-Apache-PHP-on-Mac-OS-X-Yosemite-Crunchify-Tips.png)
This configuration file is actually your username on your Mac and ends with the. DocumentRoot "/Library/WebServer/Documents" Our first task is to create a new configuration file that helps tell Apache where to serve content from.The first thing I will do is to change the Document root from the default /Library/WebServer/Documents to my Sites folder under my home directory. htaccess file does not work by default.įirst some changes in the main configuration file of Apache. Using your Mac for development of web applications or websites, is very easy as it already comes with Apache pre-installed, the problem is that.