Hi there
when I create a container using docker, the Dockerfile expose a port, for example port:8000, but the browser cant upload mydomain.cl, but mydomain.cl:8000 is ok
but just I want mydomain.cl
How could I fixed I suspect its related to a firewall right ? but Im not pretty sure thanks for help pd sorry my rusty english
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hello, @brokercl
What you can do in order to achieve this is to set a Nginx reverse proxy. You can do this by editing the nginx configuration file:
open/create the config file
/etc/nginx/sites-available/domain.com
You should have the following content:
You need to create the symlink for the file and make it available in the sites-enabled directory as well:
Then check the Nginx configuration files for any syntax errors:
If you see that the
Syntax is Okay
, then restart Nginx. If you get some syntax errors, check the exact row/line that was reported in the message and sort this out before you continue further.You can also see this amazing video tutorial on how to do this on a DigitalOcean droplet:
https://www.youtube.com/watch?v=spbkCihFpQ8
Hope this helps!
Regards, Alex