By abhisekdutta
Hello, I have a simple Bottle.py python app inside a docker container that exposes port 8081. If I visit my.droplet.ip:8081 the app shows up. Now, I want the app to be on sub.mydomain.tld. Please note that I am running Apache2 and mydomain.tld is not hosted on my droplet. How may I approach the problem?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You create an A-Record in your DNS panel that points to the desired IP address.
What you need to do is setup proxying. This can be done with Apache using mod_proxy and there’s a guide for exactly that here at DigitalOcean.
Without using a proxy, which internally accepts requests for domain.com or sub.domain.com and serves domain.com:2365 (or any application running on a port, just an example), you’d need to keep the ports in the URL’s.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.