CentOS 6.5 nginx compiler installation, and let Nginx support SSI relative path notation

Source: Internet
Author: User
Tags install openssl

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.