Directory
- Configure Tomcat-user.xml
- Configure Web. xml
- Interface display
Back to top configuration Tomcat-user.xml
Find Tomcat under conf file Add Tomcat-user.xml
<?xml version='1.0'encoding='Utf-8'?><!--Licensed to the Apache software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with ThisWork foradditional information regarding copyright ownership. The ASF licenses ThisFile to under the Apache License, Version2.0( the"License"); If you don't use ThisFile exceptinchcompliance with the License. Obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0unless required by applicable law or agreed toinchwriting, software distributed under the License isDistributed on an" as is"BASIS, without warranties or CONDITIONS of any KIND, either express or implied. See the License forThe specific language governing permissions and limitations under the License.--><tomcat-users><!--Note:bydefault, no user isIncludedinchThe"Manager-gui"role required to operate the"/manager/html"Web application. If you wish Thisapp, you must define such a user-The username and password are arbitrary.--><!--note:the sample user and role entries below is wrappedincha comment and thus is ignored when reading Thisfile. do not forget to remove<!.. .. >That surrounds them. <role rolename="Tomcat"/> <role rolename="Role1"/> <user username="Tomcat"password="Tomcat"roles="Tomcat"/> <user username="both"password="Tomcat"roles="Tomcat,role1"/> <user username="Role1"password="Tomcat"roles="Role1"/>--><user username="Admin"password="Wodemima"roles="Admin,manager"/></tomcat-users>
username your user name
password your password.
roles Your user interface
Back to top configure Web. xml
Configure the Web. XML under web-info under solr and add the following code at the end
<security-constraint> <web-resource-collection> <web-resource-name>restrict access to SOLR admin</web-resource-name> <url-pattern>/admin/*</url-pattern> < http-method>delete
Back to top interface display
After restarting Tomcat and accessing the interface, the interface will appear:
Enter your own set of users and passwords to log in.
In addition to this method can also increase the negix direction agent. Personally think Negix reverse proxy is more secure.
Solr-web Interface Add login authentication