Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

macos - XAMPP (Mac) Virtual host showing 403

I keep getting Access Forbidden Error 403 when I try running my installation of XAMPP on my MAC

I am running the project outside of /Applications/XAMPP/htdocs. It's in my /Users/my_user_name/Projects/ directory.

Every time I try and go to my virtualhost I get a 403 error: Access forbidden.

I have edited my httpd-vhosts.conf file and I have allowed Virtual hosts in httpd.conf.

I have also set the User and Group to User my_user_name and Group Admin in httpd.conf

I even tried chmoding all my files and directory 777 but I still get Access forbidden.

I have also change Deny to Allow in the httpd-xampp.conf file in the new security settings.

The erro_log provided by XAMPP doesn't mention the 403 error I do see it in my access log as 127.0.0.1 - - [21/Aug/2013:14:45:20 -0400] "GET / HTTP/1.1" 403 1034

I turned on errors and I am seeing this [authz_core:error] [pid 52813] [client 127.0.0.1:57473] AH01630: client denied by server configuration:

Not sure what else to check or try. Please help lol.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Just to have the answer right here: You can permit access by adding Require all granted to each VirtualHost in your httpd-vhosts.conf:

# VirtualHost for my.site.com
<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/Users/me/www/my.site.com/"
    ServerName my.site.com
    <Directory "/Users/me/www/my.site.com">
        ServerSignature Off
        Options Indexes FollowSymLinks IncludesNoExec
        AllowOverride All

        #Order allow,deny  <- You can remove this
        #Allow from all    <- and that

        # Insert the following:
        Require all granted

    </Directory>
</VirtualHost>

Good luck!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...