2012-03-14 78 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