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安裝地址