zoukankan      html  css  js  c++  java
  • CentOS安装、配置Nginx*

    • 添加Nginx存储库  sudo yum install epel-release
    • 安装Nginx  sudo yum install nginx
    • 启动Nginx  sudo systemctl start nginx
    • 如果正在运行防火墙,运行以下命令以允许HTTP和HTTPS通信
    sudo firewall-cmd --permanent --zone=public --add-service=http 
    sudo firewall-cmd --permanent --zone=public --add-service=https
    sudo firewall-cmd --reload
    • 在系统启动时启用Nginx    sudo systemctl enable nginx
    • 配置Nginx   '/etc/nginx/nginx.conf'
     server {
        listen        80;//监听端口号
        server_name   example.com *.example.com;
        location / {
                proxy_pass         http://localhost:5000;//转发到
                proxy_http_version 1.1;
                proxy_set_header   Upgrade $http_upgrade;
                proxy_set_header   Connection keep-alive;
                proxy_set_header   Host $http_host;
                proxy_cache_bypass $http_upgrade;
        }
    }
  • 相关阅读:
    算法第二章上机实践报告
    算法第一章作业
    第7章学习小结 不使用STL-map过实践题:QQ帐户的申请与登陆
    第6章学习小结
    HDU
    HDU 2089 不要62(数位DP)
    char-2
    chart-7
    chart-6
    char-8
  • 原文地址:https://www.cnblogs.com/xiaonangua/p/9176137.html
Copyright © 2011-2022 走看看