I followed the following guide:
and tried to open port 80, but I still have nothing open or listening:
netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 1051/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 965/sshd
tcp6 0 0 :::22
The strangest thing is that I could connect to the server yesterday and today it isn’t working anymore and the only thing I changed was to add a DNS entry on Digital Ocean.
Could this have anything to do with it?
I tried even to disable any protection with the following commands:
$ sudo iptables -X
$ sudo iptables -t nat -F
$ sudo iptables -t nat -X
$ sudo iptables -t mangle -F
$ sudo iptables -t mangle -X
$ sudo iptables -P INPUT ACCEPT
$ sudo iptables -P FORWARD ACCEPT
$ sudo iptables -P OUTPUT ACCEPT
but still only port 22 is accessible. What could be the reason for this?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
netstat -plunt should show you that the web server is trying to listen on port 80 even if it is blocked by the firewall. Make sure the server is running. If it’s Apache, run:
service apache2 start
If it’s Nginx, then:
service nginx restart
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.