Need help to access apps running on localhost

Hey there,
I am successfully running traefik in docker and able to access my deployed apps with defining labels to apps and then accessing sites with duckdns .
I have two problems acme couldn't achieve SSL certificate so I achieved with Lego acme but how to add those certificates with traefik
And I am successfully accessing those app with those duckdns domain from outside and local machine

But I am not able to access site direct from localhost so I can manage site localy it is giving 404 page not found error
And if I add my domain example abc.com to localhost or 127.0.0.1 in hosts file then also it is not working

But curl -H host:abc.com https://127.0.0.1 can access site
So how can I tell my browser to access that domain with localhost on local pc ?

Hey!

I would consider trying a simple DNS wildcard service that maps to any IP address e.g. nip.io. With that service, you can create to have the following records such as: foo.127.0.0.1.nip.io or bar.127.0.0.1.nip.io.

Hope that helps.

@jakubhajek Yes i got it but how to access those sites locally
What I mean is i can access portainer directly with localhost:9000 with direct access to that local port
Now if i loose internet than also i can operate that site now
I can understand that traefik is working with sender's queried web address when requesting so it is giving assigned web app with that address but for that i have to access to internet now if i want to access that site locally then also i have to provide that adress to access because i didnt opened port for portainer to work with traefik so if i am accessing from pc on which traefik and portainer installed how can i directly access like using localhost sites with open port ?

I.e like how i curl accessed site abc.com from 127.0.0.1 with host adress provided ? Can i do same with web browser ? Like traefik redirect me to that site on 127.0.0.1 if i am accessing site from local pc on which they both are installed