<? xml version = "1.0" encoding = "ISO-8859-1" ?> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www./jetty/configure.dtd"> < Configure class = "org.eclipse.jetty.webapp.WebAppContext" > < Set name = "contextPath" >/</ Set > <!--域名訪問路徑--> < Set name = "war" >D:/nginx/project/admin</ Set > <!--項目路徑;也可以直接war文件--> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- Optional context configuration --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> < Set name = "extractWAR" >true</ Set > < Set name = "copyWebDir" >false</ Set > < Set name = "defaultsDescriptor" >< SystemProperty name = "jetty.home" default = "." />/etc/webdefault.xml</ Set > <!--<Set name="overrideDescriptor"><SystemProperty name="jetty.home" default="."/>/contexts/test.d/override-web.xml</Set>--> <!-- virtual hosts --> < Set name = "virtualHosts" > < Array type = "String" > < Item >localhost</ Item >< Item >admin.jasonsoso.com</ Item > <!-- 虛擬域名 你可以用admin.jasonsoso.com:8080或者localhost:8080來訪問--> </ Array > </ Set > < Get name = "securityHandler" > < Set name = "loginService" > < New class = "org.eclipse.jetty.security.HashLoginService" > < Set name = "name" >Test Realm</ Set > < Set name = "config" >< SystemProperty name = "jetty.home" default = "." />/etc/realm.properties</ Set > <!-- To enable reload of realm when properties change, uncomment the following lines --> <!-- changing refreshInterval (in seconds) as desired --> <!-- <Set name="refreshInterval">5</Set> <Call name="start"></Call> --> </ New > </ Set > < Set name = "authenticator" > < New class = "org.eclipse.jetty.security.authentication.FormAuthenticator" > < Set name = "alwaysSaveUri" >true</ Set > </ New > </ Set > < Set name = "checkWelcomeFiles" >true</ Set > </ Get > </ Configure > |
|
來自: 昵稱13039494 > 《JETTY》