1 tomcat html
在根目錄建立文件夾WEB-INF 建立web.xml java
<?xml version="1.0" encoding="UTF-8"?> <web-app
xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001
/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/j...d" version="3.1" metadata-
complete="true">nginx
<error-page> <error-code>404</error-code> <location>/index.html</location> </error-page>
</web-app>web
2 nginx tomcat
修改服務器conf下的 nginx.conf 文件服務器
項目目錄app