问题
I have installed the XAMPP in my MAC.
And i just tryed to open a folder and it's returned a error 403: Access forbidden!
I read on foruns that i need to change the httpd archive, but, after the changes, no change, the error Access forbidden! on my folder/sites continues.
The http.conf that i have changed are here: "Applications/XAMPP/xamppfiles/apache2/conf"
Alias /bitnami/ "/Applications/XAMPP/xamppfiles/apache2/htdocs/"
Alias /bitnami "/Applications/XAMPP/xamppfiles/apache2/htdocs"
<Directory />
Options All
AllowOverride All
Order deny,allow
Allow from all
</Directory>
Thanks!
--
EDIT: SOLVED: http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/
回答1:
This link is really helpful
SOLVED: http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/
All you need is rights.
I didn't enable virtual hosts.
I just replaced User daemon
on User yourUserName
in /Applications/XAMMP/xammpfiles/etc/httpd.conf
So I got access to my custom folders (through symlinks in htdocs folder in my case)
回答2:
I had the same error but turns out that it was a Mac OSX file system permission issue rather than apache configuration issue.
This may not be the case every time so read This article for more details
What solved my problem :
I changed permission for /Applications/XAMPP/xamppfiles/htdocs/ using chmod to 644
sudo chmod 644 /Applications/XAMPP/xamppfiles/htdocs/
回答3:
(This question was solved by the OP and answered by editing a URL in the question. Converted to a community wiki answer. See Question with no answers, but issue solved in the comments (or extended in chat) )
The OP wrote:
SOLVED: http://f6design.com/journal/2012/03/11/configuring-virtualhosts-in-xampp-on-mac/
URL only answers are deprecated on SO. In summary, the blog posting explains the edits necessary to the files /Applications/XAMPP/xamppfiles/etc/httpd.conf
and /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
回答4:
Please type this in terminal and press enter
sudo chmod 777 /Applications/XAMPP/xamppfiles/htdocs/
回答5:
I had the same error. I looked into the error-log and found "xe2\x80\x9c"
.
Turns out the error was caused in the httpd-vhosts.conf
file.
The error was caused due to Curly quotes (”
) at the end of one of my DocumentRoot
definitions. Text edit maybe causing you this problem.
Find and replace ”
with "
(Straight quotes).
Save and Restart the server.
It worked!
回答6:
change the permissions of the application folder inside htdocs
example:
sudo chmod -R 777 example
restart apache
http://localhost/example
来源:https://stackoverflow.com/questions/22951499/mac-os-x-xampp-access-forbidden