conchincradle / study-seminar-matching-webApp

A project we have done in Rakuten internship
0 stars 0 forks source link

aws-deploy-cannot access to public ip #14

Open conchincradle opened 2 years ago

conchincradle commented 2 years ago

image

conchincradle commented 2 years ago

Amazon Linux 2にfirewalldを追加(IPアドレス制限)

the problem is not firewall but it's better to install this

conchincradle commented 2 years ago

Can't access site on EC2 instance via public ip

it's not the reason of the inbound rules

conchincradle commented 2 years ago

maybe

  1. https----------> http 2.应该是没安装http服务,需要启动http服务

httpd -version #检查是否安装

yum install httpd #安装http服务

service httpd start #启动http服务

service httpd status #检查http服务状态(会显示绿色的active(running)表示启动成功)

service httpd restart #重启http服务

通过公网IP无法访问服务器

conchincradle commented 2 years ago

为什么我无法连接到托管在我的 EC2 实例上的网站? 对于 RHEL 或 CentOS 系统,请使用命令 systemctl status httpd 来检查 Web 服务器的状态。该命令将返回 Web 服务器处于非活动状态的信息:

conchincradle commented 2 years ago
systemctl stop firewalld
sudo curl http://localhost:8000

fro m ec2 instance, we can access the index page but we cannot access from the public IP:8000

conchincradle commented 2 years ago

it seems like I can access to the Django application by my phone with university network, but I cannot access with my local PC IP, because the imbound rule is restricted by SSH!!!

conchincradle commented 2 years ago

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f9769f7fb50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/django/

run sudo service docker restart

conchincradle commented 2 years ago

image