Bạn Tìm Gì Hôm Nay ...?
Tất cả đều có chỉ trong 1 nốt nhạc !
Nếu cần hỗ trợ chi tiết gọi 1900 9477
Bước 1: Bạn mở file cấu hình web.xml của tomcat. Thường nằm trong đường dẫn thư mục: tomcat/config/. Sau đó thêm đọan code sau vào thẻ <web-app>:
<web-app>
...
<security-constraint> <web-resource-collection> <web-resource-name>Protected Context</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <!-- auth-constraint goes here if you require authentication --> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint></web-app>
Bước 2:Tiếp theo bạn mở file server.xml và chèn đoạn code sau vào thẻ <Host>:
<Valve className="org.apache.catalina.valves.RemoteIpValve" remoteIpHeader="x-forwarded-for" protocolHeader="x-forwarded-proto" protocolHeaderHttpsValue="https" />
Cuối cùng: Bạn cho restart lại service tomcat.