close

簡單的筆記下

在 web.xml 下

也就是你的 webapps 設定檔。

vi web.xml

在裡面加上

<security-constraint>
            <display-name>SolrAdmin</display-name>
            <web-resource-collection>
                     <web-resource-name>Protected Area</web-resource-name>
                     <!-- Define the context-relative URL(s) to be protected -->
                     <url-pattern>/*</url-pattern>
            </web-resource-collection>
            <auth-constraint>
                    <!-- Anyone with one of the listed roles may access this area -->
                    <role-name>manager</role-name>
            </auth-constraint>
</security-constraint>

<login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>MyAdmin</realm-name>
</login-config>
而上面的 role-name 

請至 /etc/tomcat8/tomcat-user.xml 

通常新的,裡面是都會被 注釋 掉就是了。

直接在裡面設計密碼就行了。

 

 

arrow
arrow

    本土毛牛 發表在 痞客邦 留言(0) 人氣()