How to set Apache solr admin password

前端 未结 6 1447
慢半拍i
慢半拍i 2020-12-05 01:17

I an not very familiar with solr. I have installed solr successfully. It is using jetty webserver. My solr version is 4.10.3. It admin page is not protected by password. Any

6条回答
  •  无人及你
    2020-12-05 01:27

    Enable authentication in solr admin running with solr 6.1 and jetty

    Pre condition:

    1. Solr version 6.1

    2. Solr is running successfully in the system

    3. Solr Admin running through jetty

    Process:

    1. Edit jetty.xml

    Edit the file “server/etc/jetty.xml” Add following before the Configure tag ends

    
          
            
              Test Realm
              /etc/realm.properties
              0
            
          
        
    

    2. Edit webdefault.xml

    Edit the file “server/etc/webdefault.xml” Add following before the web-app tag ends

    
        
          Solr authenticated application
          /
        
        
          core1-role
        
      
    
      
        BASIC
        Test Realm
      
    

    Special Note:

    Value used in the role-name tag need to be same used in “realm.properties” file

    3. Create new file “realm.properties”

    Create a file named “realm.properties” in the location “server/etc/” and put the below content

    admin: admin123,core1-role
    

    User Name: admin

    Password: admin123

    Role name: core1-role

    (This need to be same as the name used in role-name tag in server/etc/webdefault.xml” file )

    4. Final Step

    Restart Solr server

    Now access Solr in your browser http://localhost:8983/solr/ You will find the browser is asking for username and password. Enter the username and password.

提交回复
热议问题