Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

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

1 Answer 1

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

Try instead:

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

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

 
discard

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.