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

I'm trying to have multiple domains. Followed the instructions from web and added the lines in lighttpd.conf file:

$HTTP["host"] =~ “(^|.)$” { server.document-root = “/var/www/″ }

but when I restart the server I get the error:

(configfile.c.859) source: /etc/lighttpd/lighttpd.conf line: 37 pos: 13 invalid character in variable name 2012-02-15 07:38:57: (configfile.c.915) configfile parser failed at: =~

Everywhere I see there characters =~ and I don't know why it won't parse them now. I'm using Debian 6

share|improve this question
Is line 37 that line? And is that copied directly from the config file? – Shane Madden Feb 15 '12 at 4:05
yes this is 37 line from the conf, directly copied. before that I copied from the website. it was quotations, look answer below – cikatomo Feb 15 '12 at 4:54
Yeah, that's what I was looking to confirm. – Shane Madden Feb 15 '12 at 5:08
up vote 2 down vote accepted

I'm seeing some non-standard quotation marks (open-quote, close-quote, and something else) in what you've posted, and I think this is what lighttpd is barfing on:

$HTTP["host"] =~ “(^|.)$” { server.document-root = “/var/www/″ }

Try instead:

$HTTP["host"] =~ "(^|.)$" { server.document-root = "/var/www/" }

share|improve this answer
man, you have a good eye, congratulations. I didn't even know there was different types of quotations. – cikatomo Feb 15 '12 at 4:56
Yup - avoid Word and Wordpad when working with plain-text configs - they'll mangle - characters too. – Shane Madden Feb 15 '12 at 5:08

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.