• nginx: [emerg] unknown directive

    IT必备工具 超过5,581 views围观 0条评论
    nginx -t nginx: [emerg] unknown directive " " in /etc/nginx/conf.d/gw_waf.conf:2 nginx: configuration file /etc/nginx/nginx.conf test failed var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_st...
  • nginx 升级报错ngx_http_geoip_module.so

    Linux 超过5,678 views围观 0条评论
        nginx –t   报错 nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1012002 instead of 1014001 in /usr/share/nginx/modules/mod-http-geoip.conf:1 解决方案 1 卸载 再安装 yum remove nginx yum update nginx yum install -y nginx s...
  • 一看必会系列:nginx http跳转到https

    Linux 超过1,319 views围观 0条评论
    Setup HTTPS on Nginx Optimize HTTPS on Nginx and get an A+ score on the SSLlabs test. Optionally, set up HTTP Public Key Pinning (HPKP) Redirect all HTTP traffic to HTTPS in your Nginx config: 默认服务器写法 server { listen 80 default_server; listen [::]:80 default_server; server_name _; r...
  • nginx 官方源 2018

    Linux 超过1,323 views围观 0条评论
    Pre-Built Packages for Stable version To set up the yum repository for RHEL/CentOS, create the file named /etc/yum.repos.d/nginx.repo with the following contents: [nginx] name=nginx repo baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/ gpgcheck=0 Replace “OS” with “rhel” or “centos”, de...
  • nginx配置访问密码

    Linux 超过2,460 views围观 0条评论
      如果我们在 nginx 下搭建了一些站点,但是由于站点内容或者流量的关系,我们并不想让所有人都能正常访问,那么我们可以设置访问认证。只有让用户输入正确的用户名和密码才能正常访问。效果如下: nginx 开启访问验证 在 nginx 下,提供了 ngx_http_auth_basic_module 模块实现让用户只有输入正确的用户名密码才允...
  • 已安装nginx动态添加模块

    Linux 超过1,772 views围观 0条评论
      说明: 已经安装好的nginx,需要添加一个未被编译安装的模块,需要怎么弄呢? 具体: 这里以安装第三方ngx_http_google_filter_module模块为例 nginx的模块是需要重新编译nginx,而不是像apache一样配置文件引用.so 1. 下载第三方扩展模块ngx_http_google_filter_module # cd /data/software/ # git ...
  • 一看必会系列:nginx 反向代理https服务

    Linux 超过13,933 views围观 0条评论
    nginx 反向代理到其它https网站是不可能的,当然同域名是可以的 nginx 反赂代理到https后端是可以的 查看nginx 是否有ssl模块 nginx -v –with-http_ssl_module 到免费网站上申请ssl证书   https://freessl.org/ 并下载 下载的文件有两个: 1,ss.pem 2,ss.key 五,服务器安装,配置nginx 登录到服务...