歡迎您光臨本站 註冊首頁

這個lighttpd里的web站點的正則寫的對嗎?

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

這個lighttpd里的web站點的正則寫的對嗎?

我用的是FreeBSD+lighttpd
首先排除系統的其它問題。

我的寫的配置是這樣的:

$HTTP["host"] == "^(((www\.)|())(test)+\.+((com)|(net)|(com.cn))$"{
        server.name = ""^(((www\.)|())(test)+\.+((com)|(net)|(com.cn))$"
        server.document-root = "/home/test/www"
}


想讓主機頭為:
test.com
www.test.com
www.test.com.cn
test.net時都能正確的訪問網站,

lighttpd檢查沒錯,也能啟動成功,但打不開站點,請高手指點
《解決方案》

$HTTP["host"] =~ "^(((www\.)|())(test)+\.+((com)|(net)|(com.cn))$"{
        server.name = ""^(((www\.)|())(test)+\.+((com)|(net)|(com.cn))$"
        server.document-root = "/home/test/www"
}

這樣寫lighttpd是檢查通不過的,無法啟動服務

而且"^(((www\.)|())(test)+\.+((com)|(net)|(com.cn))$"是能匹配下面的網址的:
test.com
www.test.com
www.test.com.cn
《解決方案》

那個位高人幫忙看一下
《解決方案》

已決解決

[火星人 ] 這個lighttpd里的web站點的正則寫的對嗎?已經有460次圍觀

http://coctec.com/docs/service/show-post-32807.html