# Cannot get Avahi to work with Apache

## theosib

I'm trying to get Avahi to advertise my Apache server on my local network.

I followed the instructions here:

http://en.gentoo-wiki.com/wiki/Avahi#Apache

However, the service does not appear.  I dug through log files and found this:

[Tue Aug 16 16:23:59 2011] [error] avahi_entry_group_add_service_strlst("localhost") failed: Invalid host name

Now, I have a hostname set up, and I have a domain name setup, and I also have told Apache that its ServerName is compute0.localdomain.  Absolutely nothing I try seems to get the proper hostname through to Avahi.

Can anyone help me out here?

Thanks!

----------

## BradN

I would try running avahi with strace -v (suggest redirecting output to a file) and see if you can grep the resulting huge log file for localhost and find where it's getting it from (assuming localhost isn't present in any of its normal config files, as that should be easy to check first)

Edit:  Actually you might have to play with the -s option to change the length of strings output, and if it results in an impossibly large file you might want to use grep with -A and -B options to print surrounding context, piped directly from strace.Last edited by BradN on Tue Aug 16, 2011 10:17 pm; edited 2 times in total

----------

## theosib

I tried your strace suggestion, but I see no "localhost" anywhere in avahi's output.

I think it's a problem with mod_dnssd.

----------

