PHP站
https://oneinstack.com/ 一键安装<br>https://www.discuz.net/ bbs<br>https://wordpress.org/download/ 个人博客<br>http://www.dedecms.com/ 内容管理系统<br>
衍生版本<br>
Nginx开源版 http://nginx.org<br>
Nginx plus 商业版 https://www.nginx.com<br>
<b><font color="#FFEB3B">openresty</font> </b> : nginx+lua (访问数据库,访问kafka,访问 redis)<br>
tengine: nginx+c/c++ 淘宝网自己开发,没有商业支持。<br>
安装
前置<br>
yum install -y zlib zlib-devel<br>yum install -y pcre pcre-devel<br>
源码编译
<ol><li> ./configure --prefix=/usr/local/nginx</li><li> make && make install</li></ol>
基础命令<br>
./nginx 启动 <br>
./nginx -s stop 快速停止<br>
./nginx -s quit 优雅关闭,在退出前完成已经接受的连接请求<br>
./nginx -s reload 重新加载配置<br>
防火墙
关闭防火墙<br>`systemctl stop firewalld.service`<br>放行端口<br>`firewall-cmd --zone=public --add-port=80/tcp --permanent`<br>重启防火墙<br>`firewall-cmd --reload`<br>禁止防火墙开机启动<br>`systemctl disable firewalld.service`<br>开机启动防火墙<br>`systemctl enable firewalld.service`<br>
nginx -V 显示版本和编译参数<br>
nginx -t 检测配置文件语法是否正确<br>
https<br>
安装SSL模块<br>
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module<br>
make
cp objs/nginx /usr/local/nginx/sbin/nginx<br>
覆盖前记得把原来的nginx备份一下
基本配置<br>
http强制跳转https