# Can't configure 33 "virtualhosts" in nginx 0.7.62-0 (max=32?)

**URL:** <https://www.ruby-forum.com/t/cant-configure-33-virtualhosts-in-nginx-0-7-62-0-max-32/217922>\
**Category:** NGINX\
**Created:** [March 16, 2012, 12:58pm UTC](https://www.ruby-forum.com/t/cant-configure-33-virtualhosts-in-nginx-0-7-62-0-max-32/217922 "2012-03-16T12:58:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [March 16, 2012, 12:58pm UTC](https://www.ruby-forum.com/t/cant-configure-33-virtualhosts-in-nginx-0-7-62-0-max-32/217922/1 "2012-03-16T12:58:10Z")

</div>

Hi.

I have a Linux Ubuntu 8.04 LTS machine with nginx 0.7.62-0 installed  
from a PPA repository.

NGINX is being working correctly since now, but today I’ve tried to add  
the 33th “virtualhost” to the sites-available and sites-enabled/  
directory and nginx does not start.

I have 32 working virtualhosts from 000-virthost1 to 031-virthost31,  
but when I try to add 032-virthost (the 33th), nginx refuses to start  
with no error message. If I remove any of the virtualhosts files and add  
the new one (having again a maximum of 32), it works.

Is there a limit on the number of virtualhosts to be served? Maybe it’s  
a limit in the number of files or symlinks you can have in  
sites-enabled?

Should I upgrade nginx to correct this behaviour.

Thanks for any help, I don’t know how to fix this.

Posted at Nginx Forum:

> **[Can't configure 33 "virtualhosts" in nginx 0.7.62-0 (max=32?)](https://forum.nginx.org/read.php?2,223950,223950#msg-223950)**
>
> Hi. I have a Linux Ubuntu 8.04 LTS machine with nginx 0.7.62-0 installed from a PPA repository. NGINX is being working correctly since now, but today I've tried to add the 33th "virtualhost" to the sites-available and sites-enabled/...

---

<div class="post-metadata">

**Author:** ![compiler2k](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@compiler2k](https://www.ruby-forum.com/u/compiler2k)\
**Post date:** [March 16, 2012, 1:03pm UTC](https://www.ruby-forum.com/t/cant-configure-33-virtualhosts-in-nginx-0-7-62-0-max-32/217922/2 "2012-03-16T13:03:10Z")

</div>

Try adding:

# Number of hash buckets

server\_names\_hash\_bucket\_size 128;

in the ‘http’ section of your nginx.conf file.

> **[GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki...](https://github.com/nginxinc/nginx-wiki)**
>
> ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com
