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
  • 相关阅读:
    Senventh Week(补充完整)
    Sixth Week(补充完整)
    Fifth Week(补充完整)
    Fourth Week (补充完整)
    九大内置对象
    matlab 简单绘图
    matlab ./
    困惑
    【转】matlab中inf
    matlab x~=0
  • 原文地址:https://www.cnblogs.com/grandyang/p/10125620.html
Copyright © 2011-2022 走看看