zoukankan      html  css  js  c++  java
  • [AWS] Nginx Started but not Serving AWS上Nginx服务器无法正常工作

    After install the Nginx on AWS instance, and visit your public ip address, you might see the following:

    This site can't be reached

    xxx.xxx.xx take too long to respond.

    Try the following steps to solve:

    Go to EC2 Dashboard -> NETWORK & SECURITY -> Security Groups 

    Select your current group, and right click, choose Edit inbound rules:

    Add two items:

    HTTP - TCP - 80 - Custom - 0.0.0.0/0

    HTTP - TCP - 80 - Custom - ::/0

    Then try to visit the public ip address again, hopefully it works like this:

    If you try to visit your subdomain, and see the following page:

    An error occurred.

    Sorry, the page you are looking for is currently unavailable.

    Please try again later.

    Then try use the following command to check the log:

    grep "error_log" /etc/nginx/* -R
    tail -n 100 /var/log/nginx/error.log

    If you see the following error:

    (13: Permission denied) while connecting to upstream:[nginx]

    Try the following command to fix:

    setsebool -P httpd_can_network_connect 1
  • 相关阅读:
    四则运算结对作业
    读《构建之法》第四、十七章有感
    四则运算练习的命令行软件
    Spring01
    oop01
    运行shell脚本的三种方式
    正则表达式的基础组成部分
    C语言文件函数
    shell文件描述符及重定向
    shell基础
  • 原文地址:https://www.cnblogs.com/grandyang/p/10125620.html
Copyright © 2011-2022 走看看