2012-03-14 80 views
0

我有以下映射设置来照顾子目录,但是由于此更改,lighttpd无法启动,是否有任何问题?我也可以在哪里找到lighttpd的系统日志Lighttpd虚拟主机设置对子目录确实有效

[root @ localhost log]#/etc/init.d/lighttpd start verbose 启动lighttpd(通过systemctl):作业失败。有关详细信息,请参阅系统日志和“systemctl状态”。

$SERVER["socket"] == "0.0.0.0:443" { 
    ssl.engine     = "enable" 
    ssl.pemfile     = "/etc/lighttpd/ssl/api.testdomain.com.pem" 
    ssl.ca-file     = "/etc/lighttpd/ssl/sub.class1.server.ca.pem.cer" 

    $HTTP["host"] =~ "^api\.testdomain\.com" { 
    $HTTP["url"] =~ "^/[^/]*\.json$" { 
     server.name    = "api.testdomain.com" 
     server.errorlog   = "/var/log/lighttpd/testdomain.com/server_error_443.log" 
     accesslog.filename  = "/var/log/lighttpd/testdomain.com/server_access_443.log" 
     proxy.server    = ("" => (("host" => "127.0.0.1", "port" => 9001))) 
    } 
    else $HTTP["url"] = "^/v2/*\.json$" { 
     server.name    = "api.testdomain.com" 
     server.errorlog   = "/var/log/lighttpd/testdomain.com/server_error_443.log" 
     accesslog.filename  = "/var/log/lighttpd/testdomain.com/server_access_443.log" 
     proxy.server    = ("" => (("host" => "127.0.0.1", "port" => 9004))) 
    } 
    } 
} 

回答

1

如此经典的错误:)你把=代替==

else $HTTP["url"] == "^/v2/*\.json$" { 

我尝试了,我得到了确切的行/列的错误,而不是只有“作业失败”:

2012-03-24 10:26:31: (configfile.c.564) source: /etc/lighttpd/sites/test.fr line: 13 pos: 20 only =~ and == are allowed in the condition