1. Nginx Download
Enter http://nginx.org/en/download.html download, I am the selected "Stable version" stable release download
wget http://nginx.org/download/nginx-1.6.2.tar.gz
2. Unzip the build installation
#Tar-ZXVF nginx-1.6.2.Tar. GZ # CD Nginx-1.6.2install some nginx used by the dependent software, if you do not open SSL can not install OpenSSL, back to use when you can go back here to recompile installation once again #Yum-YInstallpcre-devel#Yum-YInstallOpenSSL openssl-devel The next step, I chose two options for compiling the module .--with-Http_stub_status_module is used to monitor the status of work since the last boot--with-Http_ssl_module is the option to turn on SSL-enabled HTTPS--prefix=/opt/Nginx This is my personal installation habit, specify the Software installation directory #./configure--with-http_stub_status_module--with-http_ssl_module--prefix=/opt/nginx# Make# Make Install
3. Questions about SSI's support for relative paths (this step does not need to be manipulated without SSI's requirements)
Since the project was developed locally with SSI support for Apache/tomcat, the <!--#include virtual= "in. shtml. /testr.shtml "--is supported. /This relative path, however, the deployment of the use of Nginx SSI, the search on the internet to take a look at the following methods to solve:
Locate the file you want to modify from the Nginx source file ngx_http_ssi_filter_module.c
Locate/home/test/nginx-1.6.2/src/http/modules/ngx_http_ssi_filter_module.c
The file finds the content "Ngx_http_parse_unsafe_uri", which is commented out as follows:
/**
if (Ngx_http_parse_unsafe_uri (R, Uri, &args, &flags)! = NGX_OK) {
return ngx_http_ssi_error;
}
**/
# then reconfigure, compile, install, and then follow the compilation options in the second step
#./configure--with-http_stub_status_module--with-http_ssl_module--prefix=/opt/nginx# make# make install
CentOS 6.5 nginx compiler installation, and let Nginx support SSI relative path notation