My localhost started working weirdly after I updated to Catalina, even after I have changed the settings according to this tutorial.

I have a site located in the folder /Users/username/Sites/sites. I also assigned virtual host to it. It works as http://site.local, but I cannot reach it as http://localhost/site.

Also, I have two more sites in the same folder: test and new_site. Permissions in both cases for the folders and the files in them are exactly the same. There are not virtual hosts for both. I can reach new_site as http://localhost/new_site/, but I cannot reach it if there is no forward slash at the end (http://localhost/new_site). The second site (test) I cannot see neither as http://localhost/test nor as http://localhost/test/. The error message that comes up in all cases above is as follows:


You don't have permission to access this resource.

Browser - Mozilla 69.0.3. Nothing works in Chrome.

Can anyone help me, please?

  • I would recommend that instead of installing LAMP related items like Apache, PHP and MySQL on your machine as that tutorial explains, you use a more portable version of a MAMP/LAMP stack by using MAMP. The non-pro version is free and works great! That tutorial is honestly overly complicated and most developers use tools like MAMP and XAMPP instead of going nuts over installing local binaries like that. – JakeGould Oct 22 at 1:26
  • Thank you for the advice. Maybe I will do so, but in the mean time, I wanted to understand the reason why it doesn't work. I checked error_log and found that apache still looking for the file in the old folder /Library/WebServer/Documents even though in httpd.conf the DocumentRoot is set as /Users/username/Sites. I can't understand why that happens. – Sbotan Oct 23 at 2:12
  • 1
    Issue solved. When you switch to DocumentRoot as /Users/username/Sites, the apart from changing conf files, you should address localhost as localhost/~username. – Sbotan Oct 23 at 22:53
  • Cool! Post that as an answer and accept it for anyone else who might be in a similar situation. – JakeGould Oct 24 at 0:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.