Reputation: 1
On Alibaba Cloud ECS instance I have NGINX working normally, I can ping it from my terminal but I can't access my site from the browser.
nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
service nginx status
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-06-04 05:33:26 CST; 30min ago
Docs: man:nginx(8)
Process: 1737 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=0/SUCCESS)
Process: 558 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 442 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 1714 (nginx)
Tasks: 2 (limit: 1129)
CGroup: /system.slice/nginx.service
├─1714 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
└─1738 nginx: worker process
when I point to my IP no response! Where is the problem?
trying the suggested fixes gave the following respose from the terminal
Upvotes: 0
Views: 655
Reputation: 333
It's problem with your Firewall, try to allow port 80 / 443
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
And check the port is listen to 0.0.0.0 with
sudo netstat -tunalp | grep 80
sudo netstat -tunalp | grep 443
If it's not solve your problem with your internal security group on alibaba Console
Network & Security
, choose Security Groups
And make sure you have allow port 80 / 443 or if you want allow all port int security Groups like this
Upvotes: 1
Reputation: 31
Did you selected Assign Public IP Address when you created ECS instance? It sounds to me like it does not have NatPublicIP address assigned during creation process of ECS.
Try to open ports:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
Then try further to inspect ports:
sudo lsof -P -n -i :80 -i :443 | grep LISTEN
Check the status of local host:
curl -i http://127.0.0.1/nginx_status
Also try to restart server:
sudo service nginx restart
sudo service nginx reload
If this does not help, try to go in debug mode and trace common errors.
If this does not help, go from the start with instance and nginx installation.
Hope this would give you idea about what step was missed.
Upvotes: 0