nginx

2019-01-18  本文已影响0人  linson0116
命令 内容 参数 备注
tar -zxvf xxx.tar.gz 解压文件 -zxvf

参考

  1. 安装依赖库gcc等
  1. 下载 pcre
  1. 编译 pcre
  1. 下载 nginx
  1. 编译 nginx
  1. nginx 配置文件
server {
    listen       80;
    server_name  localhost;

    location / {
        root   html;
        index  index.html index.htm;
    }
    
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }
}
    #gzip  on;
    
    upstream mytomcats {
        server localhost:8081;
        server localhost:8082;  
    }
        
    server {
        listen       80;
        server_name  localhost;

        location / {
            proxy_pass http://mytomcats;
        }
        
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
  1. 检查配置文件 nginx.conf 的正确性命令
  1. Nginx 命令
上一篇下一篇

猜你喜欢

热点阅读