Fixing localhost in OSX El Capitan
I finally upgraded my MacBook to El Capitan from Yosemite, therefore meaning it's time to fix my local apache web server (again).
If you get a 403 error when visiting a website on your localhost webserver you'll need to do the same.
Firstly you'll need to change the AllowOverride setting the apache httpd.conf file. It should be on line 258:
sudo nano +258 /etc/apache2/httpd.conf
While in the httpd.conf file mod_rewrite and php5 to be set to load when apache starts. Find these two lines and remove the # at the start of each:
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php5_module libexec/apache2/libphp5.so
Then restart apache:
sudo apachectl restart
Local websites should now be working!
Tips
Searching a file using nano is done with ctrl+w
More in depth info can be found here.
Leave Your Comments
blog comments powered by Disqus