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

My website does not appear when I navigate to, but it does work for

This is my lighttpd config:

$HTTP["host"] =~ "^$" {
  server.document-root = "/home/a/www/"
  server.error-handler-404 = "/index.php"
share|improve this question
up vote 3 down vote accepted

Emthigious is only partially correct,

$HTTP["host"] =~ "$" {

is a somewhat ambiguous match it would match but it would also match



a better solution would be:

    $HTTP["host"] =~ "^(www\.)?$" {

This will only match:

share|improve this answer

emills is right, you'll have to change the regex to

$HTTP["host"] =~ "$" {

Now everything that ends with "" wil be caught by the host-definition.

share|improve this answer

I don't know much about lighttpd but the ^ at the beginning of "^$" looks like it means "starts with" which means that only exactly "" will be accepted by that declaration.

share|improve this answer

Who manages the authoritative name server You could just add an entry for 'www' pointing to your web server.

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.