• 部署文件类型项目遇到的问题


    配置内容:

    # 配置服务器
    server {
        # 监听的端口号
        listen      8001;
        # 域名
        server_name 47.106.8.177;
        access_log   /var/log/nginx/zzailog/access.log;
        error_log    /var/log/nginx/zzailog/error.log;
        charset     utf-8;
    
        # 最后,发送所有非静态文件请求到django服务器
        root   html/dist/;
        index  index.html index.html;
    }

    遇到的问题是:阿里云安全组设置的开放端口8000到8010,但是并不能使用 这些端口(测试用80端口就可以)。 

    我整了下服务器防火墙: 阿里云防火墙文档: https://help.aliyun.com/knowledge_detail/41317.html

    1. 初始 防火墙是关闭的
    
    systemctl start firewalld       ##启动Firewall
    2.载入配置  
    
    firewall-cmd --reload                          ##重新载入配置,比如添加规则之后,需要执行此命令
    3.这时候使用8000-8010端口依然不行
    4.关闭防火墙 systemctl stop firewalld ##关闭Firewall 5. 然后就可以使用8000-8010端口了
  • 相关阅读:
    网络系列之
    网络系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
    Linux命令系列之
  • 原文地址:https://www.cnblogs.com/tangpg/p/9647631.html
Copyright © 2020-2023  润新知