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、

  • 相关阅读:
    常用网址记录
    css一些兼容问题
    css hack
    js 闭包
    js 继承
    js 实现淘宝放大镜
    css做三角形的方法
    js 轮播效果
    css3特效
    css布局
  • 原文地址:https://www.cnblogs.com/xuhansan/p/11776543.html
Copyright © 2011-2022 走看看