Mac OSX Forbidden you don't have permission to access/on this server workaround

Source: Internet
Author: User

(1) First check whether the *.conf has read and write permissions, if you do not want to give the file read and write permissions, such as

sudo chmod 777 localhost.conf

(2) to see if the/users/username/sites/localhost/folder has a index.html file, if not, create one, the default is to open the index.html file

(3) Last view of the localhost configuration file

For OSX 10.9 Apache 2.2

<virtualhost *: the>DocumentRoot"/users/xx/sites/localhost"ServerName localhost errorlog"/users/xx/sites/logs/localhost-error_log"Customlog"/users/xx/sites/logs/localhost-access_log"Common<directory"/users/xx/sites/localhost">Order deny,allow allow from all</Directory></VirtualHost>

For OSX 10.10 Apache 2.4

<virtualhost *: the>DocumentRoot"/users/xx/sites/localhost"ServerName localhost errorlog"/users/xx/sites/logs/localhost-error_log"Customlog"/users/xx/sites/logs/localhost-access_log"Common<directory"/users/xx/sites/localhost">Require All granted</Directory></VirtualHost>

(4) Finally restart Apache

sudo apachectl restart

Mac OSX Forbidden you don't have permission to access/on this server workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.