爲了解決CentOS7.2自帶的Nginx上沒有auth-request
支持的問題,須要本身手工編譯安裝Nginx .html
更新yumlinux
yum update -y yum -y install gcc gcc-c++ make zlib-devel pcre-devel openssl-devel
下載(可訪問官網下載最新版)nginx
wget http://nginx.org/download/nginx-1.10.1.tar.gz
解壓c++
tar -xvf nginx-1.10.1.tar.gz
編譯git
cd cd nginx-1.10.1 ./configure --with-http_auth_request_module
安裝github
make && make install
運行ide
/usr/local/nginx/sbin/nginx
判斷當前版本是否支持某項功能的命令https://github.com/shopware/devdocs/blob/master/source/blog/_posts/2015-03-02-sso-with-nginx-auth_request.md#installation:post
nginx -V 2>&1 | grep -qF -- --with-http_auth_request_module && echo ":)" || echo ":("
最後我發現,能夠經過安裝官方的版本解決沒有auth_request
支持的問題。看鏈接吧,都是淚!ui