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

Bonjour is a lovely technology. I would like all my custom vhosts on my mac (Snow Leopard) to broadcast via bonjour. What is the best way to do this, without having to enable for every vhost separately?

share|improve this question
Bonjour is lovely - seriously???? It's the first thing I disable on our Macs... – Jon Rhoades Jan 26 '10 at 9:51
Would you care elaborate? I find bonjour amazing. Why do you disable it? – Ammar Feb 11 '10 at 0:51

I'm going to be making the assumption you're using the built-in Apache Server, so...

If you open up your httpd.conf you can usually see at the very bottom:

Include /private/etc/apache2/other/*.conf

The "other" directory contains both php.conf and bonjour.conf

Bonjour.conf has a few oddities though, for one, the default file does not include some of the possible options. As far as I know there are only three possible options:


This broadcasts the main site, not a VHost, and uses the machine's name (As defined by "Computer Name" in the sharing prefs) as the Bojour service title.


this takes one of three options:

<a username>

The first two are self explanatory, but customized_users is rather clever; it checks if each user has made changes to the index.html in ~/Sites; if so, that user's page is broadcasted.


This is probably the one you are looking for; it accepts two arguments, a service name and a path.


RegisterResource HelloLan /

My suggestion:

I would try placing a RegisterResource in each VHost, although I don't use VHosts and so I haven't tried it myself.

I have heard the the mod_bonjour that is shipped by default has some issues with multiple RegisterResource options see here:

Someone leaving a comment on the aforementioned page seemed to suggest VHost Bonjour is possible.

so best of luck!

share|improve this answer

Just to clarify, you want to register alternative A/CNAME records (eg: devsite1.local, devsite2.local, ...) for your machine so that other machines can access the virtual hosts you've created? There's no easy way to do this as the Bonjour API (unlike Avahi) doesn't allow arbitrary record names to be registered.

share|improve this answer

On debian i did:
a2enmod mod-dnssd
cat /etc/apache2/mods-enabled/mod-dnssd.conf

 # This is the config file for mod_dnssd.<br>
< IfModule mod_dnssd.c><br>
    DNSSDEnable On<br>
< /IfModule>

this applies to all vhosts at once.

share|improve this answer

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.