nginx: [emerg] using regex "\.php$" requires PCRE library  或

编译nginx错误:make[1]: *** [/pcre//Makefile] Error 127

原因:nginx没有安装pcre模块,URL重定向需要正则表达式模块

解决:安装pcre,下载地址:https://ftp.pcre.org/pub/pcre/

 

下载pcre,编译nginx,指定pcre源码地址

## 下载pcre源码地址
cd /home # 安装到Home目录中
wget https://ftp.pcre.org/pub/pcre/pcre-8.44.tar.gz && \ tar xvf pcre-8.44.tar.gz

## 编译nginx
./configure --prefix=/usr/local/nginx --with-pcre=/home/pcre-8.44

 

这里编译安装pcre模块,--with-pcre指定的是pcre下载的源码地址,而不是编译后的pcre安装地址

相关文章:

  • 2022-12-23
  • 2021-10-15
  • 2021-06-18
  • 2022-12-23
  • 2021-11-11
  • 2021-05-27
  • 2021-06-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2021-12-17
  • 2021-10-07
  • 2022-12-23
相关资源
相似解决方案