1

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

<VirtualHost *:80>

ServerAdmin [email protected]

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

ServerName test

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

    AllowOverride All

</Directory>

</VirtualHost>

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

Also, in the hosts file, I've this

127.0.0.1 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

3 Answers 3

1

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

Thanks everyone, who answered

1
  • 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, 2012 at 17:14
0

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

Order allow,deny
Allow from all
5
  • How do I enable mod_access? There is no loadmodule mod_access in httpd.conf :(
    – user187809
    Jul 29, 2012 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. Jul 29, 2012 at 14:14
  • I even tried 777, it still doesn't work
    – user187809
    Jul 29, 2012 at 14:26
  • What does your Apache error_log show for the hit? Jul 29, 2012 at 14:28
  • Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /Users/myname/Sites/test/public/
    – user187809
    Jul 29, 2012 at 14:36
0

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
</Directory>
</VirtualHost>

Hope it helps.

1
  • I tried your suggestion, still not working. And yes, I did restart Apache, using "sudo apachectl restart"
    – user187809
    Jul 29, 2012 at 13:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .