nginx + tomcat初步学习,安装配置
来源:互联网 发布:蛇精脸拍照软件 编辑:程序博客网 时间:2024/05/20 19:18
1、http://nginx.org/ 下载nginx源码包
2、wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz 下载PCRE 到/opt下
因为在编译nginx时需要PCRE环境
tar xzvf pcre-8.10.tar.gz 解压后的路径为/opt/pcre-8.10
3、开始编译安装nginx
cd nginx-0.8.54
./configure --with-pcre=/opt/pcre-8.10
make
make install
4、默认安装的路径为/usr/local/nginx
5、最简单配置
在/usr/local/nginx/conf/nginx.conf 文件中加入
include /usr/local/nginx/conf/proxy.conf;
然后在 /usr/local/nginx/conf/ 目录中建立文件 proxy.conf
#!nginx (-)
# proxy.conf
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffers 32 4k;
6、在 nginx.conf 中描述哪些 url 是由 nginx 来处理,哪些由 nginx转发给tomcat进行处理
location / {
root html;
index index.html index.htm;
}
location ~*.(jsp|action)$ {
proxy_pass http://127.0.0.1:8080;
}
7、启动nginx
cd /usr/local/nginx/sbin
./nginx
用ip地址访问80端口有以下提示,表示配置成功
Welcome to nginx!
参考:http://www.iteye.com/topic/965884
http://sudone.com/nginx/nginx_new_install.html
http://nginx.org/
- nginx + tomcat初步学习,安装配置
- tomcat安装配置初步
- Nginx+tomcat整合安装配置
- Nginx+tomcat整合安装配置
- Centos安装配置nginx+tomcat
- nginx+tomcat集群安装配置
- nginx初步学习-配置反向代理
- nginx安装和nginx、tomcat集群配置
- centos下nginx+tomcat安装配置 nginx结合tomcat
- centos下nginx+tomcat安装配置 nginx结合tomcat
- Nginx + tomcat + SSL 安装配置手册
- Lvs(DR)+nginx+tomcat安装配置
- lvs(DR)+keepalived+nginx+tomcat安装配置
- Nginx+PHP+Mysql+Tomcat安装配置
- centos下Nginx+tomcat整合安装配置
- nginx+tomcat的安装与配置)
- Nginx+Tomcat+redis 集群安装及配置
- Linux nginx安装和对tomcat配置
- 【与时俱进】CoIDE 1.4.1支持Cortex M4和ARM GCC啦
- 如何查看 ubuntu 版本信息
- Esri中国首席技术官王昊谈 移动GIS 与 云GIS
- rails模型中的资料库语法
- ubuntu中修改root账号的密码命令
- nginx + tomcat初步学习,安装配置
- Eclipse插件开发问题集
- 关于CString剖析,“strcmp”: 不能将参数1从“CString”转换为“const char *”问题
- oralce中的with as语句
- COMMON LISP语言学习笔记(一)
- 你确定你真的懂了line-height吗?
- WebView.PictureListener 加载事件及完成更新
- android Toast大全(五种情形)建立属于你自己的Toast
- 黑马程序员_学习日记5_C#基础归纳总结之派生类的构造函数