0

i need to update an subdomain in my dns and lighhtpd conf i tried the dns as

 example.test.org IN A (my ip address)

in my dns and my lighttpd conf goes here

$HTTP["host"]  == "example.test.org"{
        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 .////

3 Answers3

0

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
##                http://www.lighttpd.net/documentation/simple-vhost.html

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        = "yourdomain.com"

This would allow you to create any directory in /srv/www in form of "test.yourdomain.com", 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.

Regards

Jan.
  • 276
  • 2
  • 4
0

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

WhyNotHugo
  • 227
  • 2
  • 12
0

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

zaub3r3r
  • 900
  • 7
  • 9