Skip to content

nginx使用

This page demonstrates some of the built-in markdown extensions provided by VitePress.

nginx安装

环境准备

md
yum -y install gcc-c++ 
yum -y install pcre pcre-devel
yum -y install zlib zlib-devel
yum -y install openssl openssl-devel

执行安装

md
./configure  --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-stream
make
make install

追加模块
1.查看nginx版本与编译安装了哪些模块
/usr/local/nginx/sbin/nginx -V

md
./configure --with-http_stub_status_module --with-http_ssl_module

编译
执行make,注意:不要使用make install指令,否则就是覆盖安装
将生成的nginx文件替换sbin目录下的nginx二进制文件

配置文件nginx.conf

常用命令

检查配置文件:./nginx -t
指定启动配置文件:./nginx -c /usr/local/nginx/conf/nginx.conf
暴力停止服务:./nginx -s stop
优雅停止服务:./nginx -s quit
重新加载配置文件:./nginx -s reload

More

Check out the documentation for the full list of markdown extensions.