天天看點

Gitlib配置檔案裡的server.httpBindInterface

配置檔案一般在Gitlib 安裝目錄下\data\defaults.properties 檔案裡。

# Specify the interface for Jetty to bind the standard connector.
# You may specify an ip or an empty value to bind to all interfaces.
# Specifying localhost will result in Gitblit ONLY listening to requests to
# localhost.
#
# SINCE 0.5.0
# RESTART REQUIRED
server.httpBindInterface = 
           

可以看出 這個屬性如果設定了,那麼請求Gitlib服務的話,如果是http的話,則該值可以作為context 。

該值隻能填寫 localhost 或者是 ipconfig 得出的ip (為什麼我這裡需要特别指定ipconfig ,否則啟動Gitlib會失敗。還有坑點,Gitlib 隻認ipconfig 裡的 ip 。還有, 有時候ipconfig 得到的有時候是公網,有時候是内網。填寫内網的話,使用者的機器很大可能是ping不同伺服器的内網的,是以也是無法使用Gitlib的。這種情況,其實可以不用設定該屬性,直接空着就好了。)