zoukankan      html  css  js  c++  java
  • 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、

  • 相关阅读:
    avrdude: stk500_getsync(): not in sync: resp=0x00
    PCB封装技术
    C/C++基础问题归集
    mf210v 端口的映射
    alsamixer 在音频子系统的使用
    rp2836 网卡以及串口与接插件位置关系
    RP2837 IN1-IN2 对应关系 2路DI
    RP2837 OUT1-OUT2 对应关系 2路DO
    RP2836 板卡信息标识
    RP2836 OUT0-OUT7 对应关系
  • 原文地址:https://www.cnblogs.com/xuhansan/p/11776543.html
Copyright © 2011-2022 走看看