• nginx 配置 和安装命令


    使用vi编辑~/.vimrc文件,在该文件中加入一行"set nu",添加内容不含引号, 命令如下:
    vi ~/.vimrc

    //卸载
    yum remove nginx

    //安装nginx
    wget http://nginx.org/download/nginx-1.17.0.tar.gz
    tar -zxvf  nginx-1.17.0.tar.gz -C /usr/local/nginx   
    tar -xvf nginx-1.17.0.tar.gz

    cp -r ngx_http_substitutions_filter_module /git/ngx_http_substitutions_filter_module
    //进入解压缩后的文件夹
    ./configure
    make
    make install
    cd /usr/local/nginx/sbin  
    ./nginx
    /usr/local/nginx/sbin/nginx -s reload

    /usr/local/nginx/sbin/nginx -s stop
    ./nginx -s reload
    //开启端口
    /sbin/iptables -I INPUT -p tcp --dport 8089 -j ACCEPT
    //查看nginx版本
    /usr/local/nginx/sbin/nginx -V
    //查看nginx进程是否启动:
    ps -ef | grep nginx

    //安装其他模块

    //ngx_http_substitutions_filter_module 放到nginx文件夹下,和其他所有的一样

    ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --add-module=/usr/local/nginx/echo-nginx-module-0.61 --add-module=/usr/local/nginx/ngx_http_substitutions_filter_module

    页面查看文件输出的内容,实时刷新
     tail -f /usr/local/nginx/logs/access.log

     echo "station:$arg_station";//获取请求地址后面跟着的参数值,?station=2
     echo "header-2:$http_station";//获取请求中header对应的值,比如station、

  • 相关阅读:
    [NOIP2018 提高组] 保卫王国
    CF 939F. Cutlet
    [USACO15JAN]Moovie Mooving G
    [NOIP2017 提高组] 宝藏
    花园
    [[清华集训2012]串珠子]
    帮助——状压
    R语言产生月末日期
    R for循环示例
    Spark scala String Array转为String
  • 原文地址:https://www.cnblogs.com/xuhansan/p/11776543.html
Copyright © 2020-2023  润新知