2016-02-22 67 views
0

變化 - /example/etc/webdefault.xml和密碼Solr的5.2獨立的核心設置

<security-constraint> 
    <web-resource-collection> 
     <web-resource-name>Solr authenticated application</web-resource-name> 
     <url-pattern>/</url-pattern> 
    </web-resource-collection> 
    <auth-constraint> 
     <role-name>core1-role</role-name> 
    </auth-constraint> 
    </security-constraint> 

    <login-config> 
    <auth-method>BASIC</auth-method> 
    <realm-name>Test Realm</realm-name> 
    </login-config> 

從/example/etc/jetty.xml

修改的jetty.xml文件以及
<Call name="addBean"> 
     <Arg> 
     <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> 
      <Set name="refreshInterval">0</Set> 
     </New> 
     </Arg> 
    </Call> 

我已根據solr中的身份驗證建議進行了更改。出現一個對話框在其中輸入用戶名和密碼。即使輸入正確的用戶名和密碼,它也不會將我帶到solr主屏幕。我在這裏做錯了什麼?

回答

0

我已經更改爲相對路徑的絕對路徑到

<SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set> 

解決我的問題!

+0

絕對路徑被放入什麼配置文件? – Yuday