Solr Tomcat Add Password for Admin Portal
Edit the tomcat users and add the following line
sudo nano /etc/tomcat7/tomcat-users.xml
<role rolename="solr_admin"/> <user username="your_username" password="your_password" roles="solr_admin" />
sudo nano /etc/tomcat7/web.xml
Add the following lines within the web-app xml node
<security-constraint> <web-resource-collection> <web-resource-name>Solr Lockdoawn</web-resource-name> <url-pattern>/</url-pattern> </web-resource-collection> <auth-constraint> <role-name>solr_admin</role-name> <role-name>admin</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>BASIC</auth-method> <realm-name>Solr</realm-name></login-config>
Restart Tomcat:
sudo service tomcat7 restart