|OS type and version
||Ubuntu Linux 20.04.4
Hello everyone I’m currently setting up Virtualmin so I can run multiple websites from a single server. Currently, I’ve only set up one URL for the server and I’m going to be setting up the others later.
For now, I wanted to access my virtual servers via the IP of the server. I’ve tried putting the virtual servers on different ports so I could access them via IP
When I do this I can’t reach the pages for the server. Can anyone explain what I’m currently missing ?
You don’t need to change anything at all. Put it back the way it was. It uses shared hosting which works off of a single IP.
ok, how do I access the different virtual servers? while not logged in.
The correct terminology is called “name-based” hosting.
Basically, all domains can use the same IP address, this concept was invented to address the shortage of IPv4 addresses available years ago.
What happens is…
You point all your domains to the same IP address.
On the server, when a request for “domain1.com” comes in, it checks the web server’s configuration for an entry related to “domain1.com” and serves up the page associated with that configuration. In the same way when a request for “domain2.com” comes in, it does the same thing. This removes the need for multiple IP addresses.
The key thing to be aware of with “name-based” hosting is, the DNS for each domain needs to be resolved. So if you’ve setup the domain recently, it make take an hour or two to be recognized.
A “hack” which allows you to resolve a domain without setting up DNS would be to adjust your “hosts” file on your computer. This essentially would allow you to trick your own computer into believing that the DNS for the domain has been already setup.
*** As the above “hack” can potentially be dangerous given it requires “Admin” privileges I will not provide details on this within this thread. If you know how to do it, great… If not feel free to reach out for a screen sharing session – I’ll offer you a FREE 15 minute consult if required or desired. Limited time offer. ***
*** Professional, Affordable Technical Support: https://tpnassist.com ***
are you guys reading what I’m asking?
you guys keep telling me about domains…drop that…drop that right now. As I said I’m trying to access the virtual servers on a single IP by port…that’s what I’m asking. I know that if I give each virtual server a domain I can get to them…currently, I don’t have that. So drop that
How do I get to virtual server 2 or 3 or 4 or even 5 if it does not have a URL and sits on thing same IP ?
How do I set up a virtual min to let me access each virtual server by IP address and Port.
I’m asking because this is not on a local machine but on a VPS on AWS.
Then I have to ask: why on earth would you even want to use Virtualmin? It’s a web hosting panel. That dictates that you need at least one verifiable domain to make it work as it should. Then you could use sub servers of that one domain to make as many Virtual Servers as you want.
If you’re going to do websites assigned to ports and different IP’s only, then good luck with that. I don’t think that will be possible in Virtualmin.
Well, @Gomez_Adams is correct. Put everything back to how it was and then use Virtualmin → Services → Preview Website option to view a website without using its domain / URL.
I’m not sure how you do it with Apache but you can do it with NGINX quite easily. See config code here as an example of how to do it. Mind you that’s SSL, so you may want something like:
server_name example.org www.example.org;
listen 220.127.116.11:44300 ssl;
listen [2606:2800:220:1:248:1893:25c8:1946]:44300 ssl;
And then just iterate the port numbers. (8081 8082, 44301, 44302 etc). You don’t need to worry about the server_name not resolving, if you only have one webhost on the port the IP will go to that server for you. Obviously you’ll need to use self-signed SSL for HTTPS.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.