How to use an IP-based URL to access sub-servers / sub-domain websites ?

Hi everyone,

I’m getting a bit confused here. I have a droplet with webmin / virtualmin and a LAMP server deployed but I do not have a domain name pointing at my droplet IP at the moment (and I’m not planning to have one right now as I want to do some testing before buying a domain name).

I can access my server through SSH, the webmin console at http://server-ip:20000. All this is working fine.

Now, I would like to access sub-servers I created with virtualmin (containing websites) in my web browser. I used to be able to do that with Cpanel using an IP-based URL, if I remember correctly, but this doesn’t seem to work with my configuration (http://server-ip/subdomain does not work).

Is this possible to access sub-servers / sub-domains without having registered a domain name pointing at my droplet IP?

Additional question : do I need to install BIND DNS server on my VPS to make this possible or is this unnecessary?

Thanks for your answers.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

You may use different ports for different sites for testing purpose.

Add Listen [port] in /etc/apache2/ports.conf and change <VirtualHost *:[port]> in site config files should be enough. (Ubuntu)

Make sure your firewall is not block any of those ports.