🔒 Closed Ubuntu: "Problem binding to port 80: Could not bind to IPv4 or IPv6" (Solutions)

Status
Not open for further replies.

Gbeats

Forum Expert
Sorry guys di po ako magaling mag english 😂


Most common problem using a Ubuntu OS is the 'binding to port 80: Could not bind to IPv4 or IPv6'

So out of curiosity I found some answer in Github and Youtube

Again, This tutorial is not mine. I just want to share it to you to make us all happy and to overcome stress of port 80 mania 😂

First Solution : Using 'ufw command'

This method is working to ubuntu 18 based on my experience, try it also to other versions

In your VPS type:

sudo -s

then type

ufw

to see the commands in installing ufw

op-p80-1.png


type

apt install ufw

op-p80-1.1.png

next run

snap install ufw

op-p80-1.2.png

run

ufw status

to see its status
op-p80-1.3.png

as you can see in the picture, it is inactive so we need to run

ufw enable

op-p80-1.4.png

type Y to continue

ufw status

again to see if the ufw is enabled

If its enabled, now run the command

ufw allow 80/tcp

Next is

ufw allow ssh

ufw status

again to see if Port 80 is Open in both iPV4 and 6

op-p80-1.5.png

Lastly,

run

ufw reload

op-p80-1.6.png

You can now test if it works [In my case, I need to generate cert from certbot and this works for me, again in my ubuntu18]


Second Solution:
Using apache and docker proxy

Based on my experience, it works in my ubuntu 20


First run this command

systemctl stop apache2.service

op-p80-2.png

next run

docker container ls

to see the commands in installing docker
op-p80-2.1.png

First we try to run

snap install docker

op-p80-2.2.png

now let's try to run

docker-proxy

op-p80-2.3.png

it say's not found so we need to run
install apt docker.io

Just press Y to continue
op-p80-2.4.png

Lastly, let's run again

docker-proxy

if the system accepts it.
op-p80-2.5.png

based on the picture above, we successfully run the dockery-proxy so we are now free to test if the problem is Fixed

And I hope it will really fix your problem in making Port 80 open 😁


So in my ubuntu 20 I tried this in generating certificate using certbot

VIOLA!.png

And it works!

I Hope this tutorial helps you in your Port 80 problem 😁

You can also try this in other OS, if this also works, Congrats 😁


So yun, Share ko lang po yan sakit ng ulo at ilong ko 😂



Full credits to Github and YT 😁
 

Attachments

  • op-p80-1.4.webp
    op-p80-1.4.webp
    41.4 KB · Views: 40
Status
Not open for further replies.

About this Thread

  • 25
    Replies
  • 2K
    Views
  • 10
    Participants
Last reply from:
Ephy

Trending Topics

Online now

Members online
385
Guests online
7,472
Total visitors
7,857

Forum statistics

Threads
2,339,156
Posts
29,308,099
Members
1,122,898
Latest member
barok97
Back
Top