CentOS 7.9 安裝 nginx-1.22.0( 二 )

八、nginx 配置使用源碼安裝方式,nginx的配置文件,通常會在  /usr/local/nginx/conf/nginx.conf  這個位置 , 可以通過 vi 或 vim 修改 。
# 打開配置文件vim /usr/local/nginx/conf/nginx.conf九、防火墻# 關閉防火墻systemctl stop firewalld# 開放3306端口命令firewall-cmd --zone=public --add-port=3306/tcp --permanent# 配置立即生效firewall-cmd --reload云主機需配置安全組(默認已放行,可省略)
在入方向規則,允許80放行

CentOS 7.9 安裝 nginx-1.22.0

文章插圖
十、問題記錄錯誤:./configure: error: the HTTP rewrite module requires the PCRE library.
解決:安裝pcre-devel:yum -y install pcre-devel
錯誤:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using –without-http-cache option, or install the OpenSSL library into the system, or build the OpenSSL library statically from the source with nginx by using –with-http_ssl_module –with-openssl= options.
解決:yum -y install openssl openssl-devel
錯誤:

推薦閱讀