nginx.conf配置信息
80端口
443端口
tomcat的server.xml配置信息
在linux上安装nginx可以指定安装目录,./configure --prefix=/opt/nginx默认为/usr/local下
既然用到https肯定要启用SSL支持,所以结合指定安装目录
[root@abc123 nginx]# ./configure --prefix=/opt/nginx \
> --with-http_ssl_module \
> make && make install回车即可
在安装好的nginx的sbin下重启nginx可能会有
nginx:[emerg] bind() to 0.0.0.80 failed (98 address already in use)
的错误,找到是哪个线程占用(netstat -ntpl)一般都是nginx自己占用,kill -9 (线程编号)即可
附:参考的是这个https://www.oschina.net/question/12_213459
很详细:http://www.cnblogs.com/jingmoxukong/p/5945200.html
Nginx开发从入门到精通:http://tengine.taobao.org/book/