Solr-web Interface Add login authentication

Source: Internet
Author: User
Tags solr

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.