When i try to open localhost it gives me 403 error message like this "You don't have permission to access / on this server."
I have tried changing the permission but nothing happens. It worked fine with High Sierra but after update its not working.I am using the pre installed apache and not using third party apps like xampp
PHP not working after upgrading to OS Mojave
apachemampmojavePHP
Related Question
- Apache not working with user Sites folder on macOS 10.13 High Sierra
- After MacOS High Sierra install, localhost fails and apache has syntax errors
- MacOS – Solve /Users/theusername/Sites/foo ~/bar localhost/~theusername High Sierra Apache server connection Internal Server Error
- Automator app stopped working after updating to macOS Mojave
- PHP won’t include files properly since updating to Mojave
- MacOS – PHP not running after upgrading to Catalina
Best Answer
I had the same problem - it's based on mod_userdir exclusion after updating to Mac OS X Mojave. There are a few steps to repair that:
mod_userdir
in/etc/apache2/httpd.conf
httpd.conf
make sure to loadhttpd-userdir.conf
/etc/apache2/users/<username>.conf
Put a directory section into that file, containing the rules for the directory where your webserver files are located:
This should set you up.