Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've added a virtual host in my vhosts file like this

<VirtualHost *:80>


DocumentRoot "/Users/myname/Sites/test/public"

ServerName test

<Directory "/Users/myname/Sites/test/public">

    AllowOverride All



My zend project is in the path "/Users/myname/Sites/test", called it test

Also, in the hosts file, I've this test

These are the exact same steps I did on Windows, where it works correctly. But on Mac, it doesn't. I get

"Forbidden You don't have permission to access /test/public/ on this server" error.

What else am I missing?

My rewrite module is on

share|improve this question

migrated from Aug 16 '12 at 3:13

This question came from our site for professional and enthusiast programmers.

Finally, after wasting a couple of hours, found the solution I had to add Options +FollowSymLinks within the Directory :(

Thanks everyone, who answered

share|improve this answer
Good to know. :-) Interestingly, I had this commented out in my file, hence why it did not appear in my answer. Apparently I had to comment it out to make it work for me. Glad you made it work. – andy124 Jul 29 '12 at 17:14

Do you have mod_access enabled? You may need to add this inside your Directory stanza:

Order allow,deny
Allow from all
share|improve this answer
How do I enable mod_access? There is no loadmodule mod_access in httpd.conf :( – user187809 Jul 29 '12 at 14:01
Hmm, if it's not even loaded then I think it defaults to allow all, so I guess that makes my answer irrelevant. How about permissions? Make sure that the directory your project is in can be read by the user running Apache. – Alex Howansky Jul 29 '12 at 14:14
I even tried 777, it still doesn't work – user187809 Jul 29 '12 at 14:26
What does your Apache error_log show for the hit? – Alex Howansky Jul 29 '12 at 14:28
Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /Users/myname/Sites/test/public/ – user187809 Jul 29 '12 at 14:36

First of all, make sure that you have restarted your web server. I got that error too a few days ago after having changed the paths without restarting.

Below is part of my httpd-vhosts.conf on OS X Lion 10.7 and AMPSS.

<VirtualHost *:80>
ServerName zend.local
SetEnv APPLICATION_ENV development
DocumentRoot "/Users/Andy/dev/quickstart/public"
<Directory "/Users/Andy/dev/quickstart/public">
    DirectoryIndex index.php
    AllowOverride All
    Order deny,allow
    allow from All

Hope it helps.

share|improve this answer
I tried your suggestion, still not working. And yes, I did restart Apache, using "sudo apachectl restart" – user187809 Jul 29 '12 at 13:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.