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?
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.
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.
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.
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 ***
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.