繁体   English   中英

solr 5.2独立核心设置的用户名和密码的设置

[英]setting of Username and Password for solr 5.2 standalone core setup

-/example/etc/webdefault.xml中的更改

<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主屏幕。 我在这里做错什么吗?

我已经将绝对路径更改为相对路径

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

解决了我的问题!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM