'How can I access docker container with domain.name

hi my docker container is running on serverip:5110 port

An angular project in a docker container was launched with nginx.

The nginx file in my container looks like this nginx.conf

events{}
http {
    include /etc/nginx/mime.types;
    server {
        listen 80;
        server_name www.x.com x.com;
        root /usr/share/nginx/html;
        index index.html;
        location / {
            try_files $uri $uri/ /index.html;
        }
    }
}

I can access this container and my angular page with server_ip:5110

Do I need to redirect to another nginx other than container to reach with domain name?

how should I do

help me pls



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source