2

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

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

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

3
  • 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
2

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"] =~ “(^|.)example.com$” { server.document-root = “/var/www/example.com″ }

Try instead:

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

2
  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.