Web hosting problem and IPs

**Operating system:Ubuntu **
OS version: 20.04

Hello Guys,

I’m new to Virtualmin; I have purchased a domain name from NameCheap to host my site on. I watch both videos of Virtualmin step by step tutorial:

  1. Virtualmin Installation and Configuration… : Virtualmin Installation and Configuration with CentOS 7 on Vultr - YouTube
  2. Creating a Virtual Server (Domain) in Virtualmin: Creating a Virtual Se

The problem is that when I type my domain name on my computer (port 80) I got, apache It works! page instead of my website page, and on port (443 + let’s encrypt SSL), I got an error page ( This site can’t provide a secure connection).
What I ping my domain, my external IP respond.

So this is my setup:
Server IP: 192.168.1.49
Domaine: 192.168.1.14 (Have access to the web site 80 and 443 Self-signed)
Public 135.xxx.xxx.xxx (external IP linked to my domain)
I’m using NameCheap NS.

How could I make my site work on my public IP address on port 80 and 443?

Thank you for your help,
Daniel

1 Like

Hello @Daniel_Server and welcome to the community.

The first thing that you must do is configure the DNS records of your domain, via the NameCheap control panel, in the manner described below:

After that, rerun the Post-install Wizard via Virtualmin → System Settings → Re-Run Installation Wizard and be sure to correctly apply the correct domain at the various stages of the wizard, particularly for nameservers.

Finally, you need to apply for a SSL certificate for your domain via Virtualmin → Server Configuration → SSL certificate.

Your domain should then show the lock icon, else give us a holler here with info about the steps that you took and the output of each step.

@Daniel_Server

Hi, are you running dns on your own or you use your hosting for that?

also you need to enable site ssl in virtualmin and once enabled head to lets encrypt panel and press button to get ssl certificate. Remember in automatic renewal to set up every two and half moths (2.5). Once done you should have http and https as well.

Yes I’m using virtalmin for web host and I purchase it from NameCheap. Also I already check the SSL button.

So if I understand in Virtualmin configuration I entered NameCheap NS and instead I should just give it my FQDN domain that I created in the terminal that was: webdashboard.local.

The domain: webdashboard.local I created to login to my webmin dashboard (webdashboard.local:10000)

Please corrected me if I’m wrong.

The hostname of Virtualmin should be a subdomain - e.g. vps.webdashboard.local or as per the example I have provided, i.e vps.domain.tld.

The name servers etc. should also be created as per the example I had provided.

You could then access Virtualmin via webdashboard.local:10000 or xyz.tld:10000 if xyz.tld is one of the domains (virtual servers) hosted on Virtualmin.

So my .com domain must have port 10000 open among with ports 80 and 443, if I’m correct.

And 20000 for Usermin, along with the rest of the customary service ports (or where possible, their replacements if you change them).

Richard

Guys thanks for your help but even with all your help I still unable to access my site.

@Daniel_Server,

I’d be happy to provide some personalized assistance over a screen sharing session if you are open to the idea.

Drop me a PM if you are interested :slight_smile:

Best Regards,
Peter Knowles | TPN Solutions

2 Likes

Go to the place you registered your domain with. They will automatically point your domain to their own servers hoping you will use them.

You have to change the name servers where you registered your domain to point to your server. Now, that can be difficult if you don’t know what you’re doing.

Let’s assume you have no idea what you’re doing. (No offense, let’s just walk through this thing.)

A good idea is to create a Cloudflare account. They can make things easier for you and protect your site. So you sign up for a Cloudflare account. They will tell you to point your name servers to them and they will give you the names to enter.

So you go back to your Name Cheap site, log in, and change your name servers to whatever Cloudflare told you to change them to.

After you do that, Cloudflare will import all the data from where you registered your domain at. You’ll see all of that information in the DNS tab of Cloudflare.

All you’ll have to do then is go into the DNS of Cloudflare and change the IP addresses to point to your external IP address of your server and it will work.

Guaranteed.

Yes, Thanks of course I will be interested.

Hi,

For those interested, the issue stemmed from port forwarding to the wrong internal IP address. @Daniel_Server was forwarding to the IP issued to wifi connection, but the virtual server was making use of the IP assigned to the wired connection.

Very simple in the end, but even I overlooked it at first glance.

Anyways, thanks @Daniel_Server for giving me the opportunity to work with you on this, I’m glad the issue is now resolved.

*** Always great chatting with a fellow canuck ***

Best Regards,
Peter Knowles | TPN Solutions

4 Likes

Hello guys,

Finally, @tpnsolutions help me, and from his help, we conclude that the problem comes from the IP address.
My server was in my room, far from my router, so I connect the server throw wifi without thinking that Virtualmin doesn’t support connection, so I had the IP address 192.168.1.49, then I connected throw ethernet. The IP address has moved to 192.168.1.14. So the problem was a question of IP addresses, So we went to Virtualmin>Server Configuration> Change IP Address and change it to the new one 192.168.1.14 we also went to the file called nano /etc/apache2/sites-available/website.com.conf and make sure the IP address if the virtual host file has been set to the new one for HTTP and HTTPS.

After everything has been set correctly, we recreate the SSL certificate.

And DONE

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.