[nginx]centos6.5下nginx-1.6.2的安装,与tomcat简单整合

来源:互联网 发布:js如何清空div的内容 编辑:程序博客网 时间:2024/06/08 02:43

环境:[centos_6.5+nginx_1.6.2]

wget http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpmyum localinstall nginx-release-centos-6-0.el6.ngx.noarch.rpmyum install nginx

全部指向tomcat8080端口,修改文件/etc/nginx/conf.d/default.conf,内容如下
server {    listen       80;    server_name  localhost;    location / {        index index.jsp;        proxy_pass http://localhost:8080;    }    error_page   500 502 503 504  /50x.html;    location = /50x.html {        root   /usr/share/nginx/html;    }}
常用命令:

To start nginx, run the executable file. Once nginx is started, it can be controlled by invoking the executable with the -s parameter. Use the following syntax: 
nginx -s signal
Where signal may be one of the following: 
    stop — fast shutdown 
    quit — graceful shutdown 
    reload — reloading the configuration file 
    reopen — reopening the log files 

0 0
原创粉丝点击