server {
listen 80;
server_name localhost;
index index.html index.htm index.jsp; #设定访问的默认首页地址
root /www/demon;#设定网站的资源存放路径
#charset koi8-r;
#access_log logs/host.access.log main;
#location / {
# root html;
# index index.html index.htm;
#}
location ~ .*.jsp$ { #所有jsp的页面均交由tomcat处理
index index.jsp;
proxy_pass http://localhost:8080; #转向tomcat处理
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ #设定访问静态文件直接读取不经过tomcat
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
}以上就介绍了centos65 nginx+tomcat部署,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号