Reputation: 14513
I have the following mapping setup to take care subdirectories, but with this change lighttpd failed to start, is there anything wrong? also where can I find the system logs for lighttpd
[root@localhost log]# /etc/init.d/lighttpd start verbose Starting lighttpd (via systemctl): Job failed. See system logs and 'systemctl status' for details.
$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) ) )
}
}
}
Upvotes: 0
Views: 842
Reputation: 22756
Such a classic error :) You put =
instead of ==
else $HTTP["url"] == "^/v2/*\.json$" {
I tried it and I got the exact line/column error instead of just your "Job failed":
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
Upvotes: 1