Sometimes, we need to install nginx separately to handle a large number of download requests. How to solve the rewrite and HTTP cache errors when installing nginx on centos5 separately:
Wget http://nginx.org/download/nginx-0.8.33.tar.gz
Tar-zxvf nginx-0.8.33.tar.gz
CD nginx-0.8.33
./Configure -- prefix =/usr/local/nginx
An error occurred while installing nginx.
./Configure: error: the HTTP rewrite module requires the PCRE Library.
Install PCRE-devel to solve the problem
Yum-y install PCRE-devel
Error message:./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 = <path> options.
Solution:
Yum-y install OpenSSL-devel
Summary:
Yum-y install PCRE-devel OpenSSL-devel
./Configure -- prefix =/usr/local/nginx
Make
Make install