配置来源
https://stackoverflow.com/questions/28043957/how-to-set-apache-solr-admin-password

注意:配置用户名密码后 集群连接也要设置 用户名 密码 1.配置Solr后台管理界面登录权限 cd /opt/solr-6.1.0/server/etc vi jetty.xml 在标签</Configure> 配置如下: <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> 创建文件:realm.properties 追加内容: admin: woaixiaotian,core-role 2.编辑 webdefault.xml 在标签</web-app>前追加 vi 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>core-role</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>BASIC</auth-method> <realm-name>Test Realm</realm-name> </login-config>

  

相关文章:

  • 2022-01-27
  • 2021-11-23
  • 2021-05-09
  • 2021-07-07
  • 2021-11-18
  • 2021-12-15
  • 2022-01-05
  • 2021-12-02
猜你喜欢
  • 2021-07-28
  • 2022-01-02
  • 2021-08-11
  • 2022-01-12
  • 2021-12-16
相关资源
相似解决方案