Solr后台管理界面配置

时间:2023-03-09 07:53:52
Solr后台管理界面配置
配置来源
https://*.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>