Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Compiling source code Nginx module installation subs_filter     - How to disable UEFI to install Linux on Win8 (Linux)

- Linux startup and logon security settings (Linux)

- Linux RHCS basic maintenance commands (Linux)

- How to set IonCube Loaders in Ubuntu (Linux)

- Ftp user to create multiple virtual machines to support different access rights Examples (Server)

- DVD production using CentOS installation source within the company Yum (Linux)

- Mind mapping software installed in CentOS 7 in XMind (Linux)

- Open log in Hibernate (Programming)

- PXE installation of Linux servers (Server)

- Oracle Character Set Summary (Database)

- Linux hard drive failure Case Studies (Linux)

- The method of MySQL two kinds of incomplete recovery (Database)

- Linux for enterprises to build a firewall (Linux)

- How VirtualBox and VMware virtual machine conversion (Linux)

- 10 Linux in the passwd command examples (Linux)

- Three kinds of implementation model of the Linux thread history (Programming)

- Revised OpenJDK Java Memory Model (Programming)

- Close common port to protect server security (Linux)

- The method of Linux into the rescue mode (Linux)

- Usage Linux device tree (Programming)

  Compiling source code Nginx module installation subs_filter
  Add Date : 2017-04-13      
  When using a reverse proxy nginx build linuxidc mirror server needs to be a response to the content of the official linuxidc string replacement server, such as host name will replace www.linuxidc.com mirror server, the https: // Replace http: //. The nginx no built this feature, you need a third-party module, such as subs_filter.

Configuration module in nginx, unlike apache so simple (copy module files, modify the configuration file) needs to be introduced nginx source module source code to compile and install nginx.

Share yourself on the following compile and install CentOS practical steps nginx contains subs_filter module.

0) If you do not install nginx on centos, use yum to install it, will automatically add some nginx initial configuration file yum install such /etc/rc.d/init.d/nginx,/etc/nginx/nginx.conf (I will not add a configuration file to compile and install).

yum install nginx

1) to give nginx source code Download from #Source Releases section http://wiki.nginx.org/Install and download extract.

wget http://nginx.org/download/nginx-1.8.0.tar.gz
tar xf nginx-1.8.0.tar.gz

2) git checkout subs_filter source (reference nginx_substitutions_filter).

git clone git: //github.com/yaoweibin/ngx_http_substitutions_filter_module.git

(NOTE: Save path / git / ngx_http_substitutions_filter_module)

3) nginx compiled configuration

./configure --prefix = / usr / share / nginx --sbin-path = / usr / sbin / nginx --conf-path = / etc / nginx / nginx.conf --error-log-path = / var / log / nginx / error.log --http-log-path = / var / log / nginx / access.log --http-client-body-temp-path = / var / lib / nginx / tmp / client_body --http -proxy-temp-path = / var / lib / nginx / tmp / proxy --http-fastcgi-temp-path = / var / lib / nginx / tmp / fastcgi --http-uwsgi-temp-path = / var / lib / nginx / tmp / uwsgi --http-scgi-temp-path = / var / lib / nginx / tmp / scgi --pid-path = / run / nginx.pid --lock-path = / run / lock / subsys / nginx --user = nginx --group = nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_spdy_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --add-module = / git / ngx_http_substitutions_filter_module

Last --add-module is introduced subs_filter module.

4) compile and install nginx

make && make install

5) Configure subs_filter in the /etc/nginx/nginx.config

server {
    listen 80;
    listen [::]: 80;
    server_name [mirror_host_name];

    location / {
        proxy_pass http://www.linuxidc.com;
        proxy_cache linuxidc-cache;
        proxy_cache_valid 168h;
        proxy_ignore_headers Set-Cookie Cache-Control;
        subs_filter www.linuxidc.com [mirror_host_name];
        subs_filter https: // http: //;

5) Restart nginx service

systemctl restart nginx
- Examples 14 grep command (Linux)
- To install the Ubuntu Touch emulator on Ubuntu (Linux)
- Zabbix monitoring platform to extract a single server graphical Python implementation of concurrent (Server)
- Spring use Cache (Programming)
- RHEL5 establish a local yum source (Linux)
- Macro Analysis Performance: PHP Performance Analysis and Experiment (Programming)
- pkg-config to use (Linux)
- Linux foreground to background process switch (Linux)
- ORA-00020: No more process state objects available (Database)
- HTTPS Encryption Algorithm (Linux)
- Number JavaScript type system (Programming)
- CentOS 6.4 RPM install MySQL-5.6.22-1 (Database)
- The first deployment of cross-platform operation Rafy record (Server)
- crontab cause CPU exception Analysis and Processing (Linux)
- Linux System shutdown procedures (Linux)
- C ++ multithreading and critical resource instance (Programming)
- Bubble Sort Algorithms (Programming)
- Linux Mint brightness adjustment --xrandr command learning (Linux)
- Win7 + Ubuntu Kylin + CentOS 6.5 installed three systems (Linux)
- Mount NFS network file system (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.