I am experiencing some odd behavior with Apache. I have several vhosts setup on my local machine. I am currently experiencing this on 1 of the vhosts, as I am doing dev work constantly, however I think it happened on another local site as well.
Here's whats happening:
I go to nekst.local and the page loads fine. I refresh the page constantly to check my updated code. All of a sudden I get a 403 error in the console for all assets but the page loads (minus assets). If I refresh again I get a 403 error in browser rather than a page load. If I restart apache everything works for a while and then all of a sudden it happens again.
I did recently download xdebug and add that to my php.ini. I'm not sure if this may be causing any issues.
I am running apache 2.4.9, php 5.5.14 on osx yosemite
my vhost:
<Directory "/Users/shawn/Documents/work/sites/mindbox/nekst/webapp/web">
Require all granted
AllowOverride All
</Directory>
<VirtualHost *:80>
DocumentRoot "/Users/shawn/Documents/work/sites/mindbox/nekst/webapp/web"
ServerName nekst.local
ErrorLog "/Users/shawn/Documents/work/sites/mindbox/nekst/webapp/app/logs/error_log"
CustomLog "/Users/shawn/Documents/work/sites/mindbox/nekst/webapp/app/logs/access_log" common
</VirtualHost>
and my dir:
drwxr-xr-x 15 shawn staff 510 Jan 27 10:25 web
Have you tried looking into your error log for more details?
I always run the following command while developing PHP, to be aware of any notices. It may also help you narrow down this issue:
Ctrl-C when done
Do you have mod_evasive enabled in apache? I had the same kind of problem and after disabling it, the problem was gone. See here for a guide to tweak values for mod_evasive: http://www.faqforge.com/linux/prevent-dos-attacks-on-apache-webserver-for-debian-linux-with-mod_evasive/