Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

i need to update an subdomain in my dns and lighhtpd conf i tried the dns as IN A (my ip address)

in my dns and my lighttpd conf goes here

$HTTP["host"]  == ""{
        server.document-root = "/var/www/example"
        accesslog.filename         = "/var/www/example/access.log"

i am not redirected says server not found can any one help me .////

share|improve this question
What is the result of an nslookup on the host? Maybe you have old entries in your DNS cache? – Ben Quick Sep 9 '10 at 8:01

You might also want to have a look on mod_simple_vhost. Here's the debian configuration example:

root@yourdomain:/etc/lighttpd# cat conf-enabled/10-simple-vhost.conf 

## Simple name-based virtual hosting
## Documentation: /usr/share/doc/lighttpd-doc/simple-vhost.txt

server.modules += ( "mod_simple_vhost" )

## The document root of a virtual host isdocument-root =
##   simple-vhost.server-root + $HTTP["host"] + simple-vhost.document-root
simple-vhost.server-root         = "/srv/www/"
simple-vhost.document-root       = "/htdocs/"

## the default host if no host is sent
simple-vhost.default-host        = ""

This would allow you to create any directory in /srv/www in form of "", to activate this subdomain. Make sure you add the htdocs directory inside the directory.

But I guess you should check the DNS propagation at first, like Ben Quick mentioned.


share|improve this answer

What's the result of "dig"? Is the IP right? In any case, until you get a proper responde there, you won't have anything working under that subdomain.

share|improve this answer

Replace the first line to: $HTTP["host"] =~ "example\.test\.org$"{ Maybe that works.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.