首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

nginx + tomcat初始学习,安装配置

2012-08-22 
nginx + tomcat初步学习,安装配置1、http://nginx.org/?下载nginx源码包2、wget ftp://ftp.csx.cam.ac.uk/pu

nginx + tomcat初步学习,安装配置

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 文件中加入

?

            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/

热点排行