1. 安装Tomcat8
pacman -S tomcat8
2. 配置tomcat-users.xml
nano /etc/tomcat8/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="tomcat"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="admin" password="admin" roles="tomcat, admin-gui,manager-gui"/>
</tomcat-users>
3. 测试Tomcat8
在浏览器中输入http://localhost:8080
4. 安装Nginx
pacman -S nginx
5. 配置nginx.conf
upstream local_tomcat {
server localhost:8080;
}
server{
location / {
proxy_pass http://local_tomcat;
}
}
网友评论