Report this

What is the reason for this report?

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

Posted on October 20, 2014

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.



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!

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.

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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.