网站首页 > 技术教程 正文
nginx是一款优秀的反向代理服务器,在生产环境部署中经常使用。一方面在负载均衡中性能优秀,比apache更出色,在工作中,必须掌握基础的nginx配置,学会查阅文档,亲手实验搭建环境,建议在linux环境安装,包括源码安装,yum软件包,rpm安装,docker容器部署等,都得会点。
这个主要是配置nginx.conf文件,使用nginx的proxy_pass指令转向tomcat处理,其中location匹配.jsp
user nobody;
worker_processes 4;
events{
worker_connections 1024;
}
http{
server{
listen 127.0.0.1:80;
server_name 127.0.0.1;
access_log logs/server1.access.log combined;
location ~ \.(jsp|jspx|do)?$
{
root /u01/apps;
index index.jsp index.jspx index.do;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080;
}
}
}关注公众号“宝康大叔“领取更多学习资料和项目资料。
猜你喜欢
- 2024-10-12 详解定制rpm包一键部署过程(rpm制作安装包)
- 2024-10-12 离线安装所有可直接yum的服务(离线安装文件是什么)
- 2024-10-12 linux之yum下载rpm包离线安装(linux离线安装yum 源)
- 2024-10-12 你不知道的rpm别样用法(rpm格式是什么意思)
- 2024-10-12 CentOS下如何制作nginx RPM包(linux nginx rpm安装)
- 2024-09-22 CentOS 7.X 上 安装Nginx+php环境
- 2024-09-22 Linux centos 安装nginx(linux中nginx安装)
- 2024-09-22 19《Nginx 入门教程》Nginx综合实践
- 2024-09-22 linux下安装nginx(linux安装nginx详细教程)
- 2024-09-22 CentOS7 yum 安装 Nginx最新版本(centos7配置阿里云yum源)
欢迎 你 发表评论:
- 12-16华为定时关机怎么设置在哪(华为定时开关机在哪里设置)
- 12-16夸克浏览器在线打开网页(夸克浏览器网页版)
- 12-16修复windows(修复windowsapp文件夹)
- 12-16球队排名榜实时排名(球队排名榜实时排名怎么看)
- 12-16windows10产品密钥永久激活免费
- 12-16怎样恢复u盘里的文件(怎样恢复u盘内容)
- 12-16电脑用着用着就黑屏了是怎么回事
- 12-16uc浏览器下载安装2025最新版
- 最近发表
- 标签列表
-
- 下划线是什么 (87)
- 精美网站 (58)
- qq登录界面 (90)
- nginx 命令 (82)
- nginx .http (73)
- nginx lua (70)
- nginx 重定向 (68)
- Nginx超时 (65)
- nginx 监控 (57)
- odbc (59)
- rar密码破解工具 (62)
- annotation (71)
- 红黑树 (57)
- 智力题 (62)
- php空间申请 (61)
- 按键精灵 注册码 (69)
- 软件测试报告 (59)
- ntcreatefile (64)
- 闪动文字 (56)
- guid (66)
- abap (63)
- mpeg 2 (65)
- column (63)
- dreamweaver教程 (57)
- excel行列转换 (56)

本文暂时没有评论,来添加一个吧(●'◡'●)