# Apache VirtualHost Limit?



## ArSaL

So I am setting up a server and it has ~600 sites...

I'm running Apache 2.2 and when i try to start the server using apachectl start

with 506 <VirtualHost> entries, it fails

with 505, it'll start but the pages give this error for PHP pages:


> Warning: Unknown(/home/test/public_html/index.php): failed to open stream: Too many open files in Unknown on line 0
> 
> Warning: (null)(): Failed opening '/home/test/public_html/index.php' for inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0


and a 403 for non-PHP pages

with 504 and below, it'll boot and serve pages correctly...... 



i tried using apache 1.3.34 thinking maybe it was a problem with apache but no luck, same problems with that..... anyone have any ideas? I could really use some help, thanks in advance 


edit: i'm using fedora core


----------



## Skie

It looks like you're running into a resource limitation issue. Take a look at the following link and scroll to the bottom and read the section titled "File Handle/Resource Limits". 

http://webworldforum.unesco.org/manual/vhosts/virtual-host.html


----------



## Jayso

Well, i'm not sure about the php related messages

But the 403 (Forbiden) should be solved by configuring the VirtualHost's DocumentRoot with a <Directory> thingy

Seeing as you would have different DocumentRoots in each virtual host, you would need to give that directory it's settings(directives...whatever...)

If you have done this then I wouldn't have a clue what is wrong other than what Skie said

Wish you well


----------

