Issue
I have a Linux VPS with docker installed, I ran an Nginx docker container on a specific port using flag -p, when I try connecting to it using VPS_IP:PORT always get Connection_Refused.
even using curl http://localhost:PORT
return connection refused.
Except for port 80, every other port refuses to connect, though ufw is disabled.
docker container command I used:
docker container run -d -it -p 83:83 --name container_name -v /home/.../:/container_path/ nginx
Any thoughts on how to solve this problem?
Solution
Correct docker container command is :
docker container run -d -it -p 83:80 --name container_name -v /home/.../:/container_path/ nginx
Because Nginx docker image is listening on internal port 80
Answered By - Pavel Trzaskalik Answer Checked By - Senaida (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.