Article 6FK55 new website opens using ip4 numbers but not using name

new website opens using ip4 numbers but not using name

by
Pedroski
from LinuxQuestions.org on (#6FK55)
I rented a new cloud server with IONOS, cheap.

I have set it up, and used Filezilla to upload the webpages.

I have tested all the little webpages on my laptop first. Everything works as I want, all very very simple stuff!

I have not set up ssl yet.

Let's say my public ip4 number is 123.456.789.123

If I enter http://123.456.789.123 then my webpage opens, no problem.

Let's say my webpage name is mywebpage.com

If I enter http://mywebpage.com I end up at IONOS, not my webpage. I don't understand this.

I have set up a virtual host like this:

Code:<VirtualHost *:80>
ServerName mywebpage.com
ServerAlias www.mywebpage.com
ServerAdmin webmaster@mywebpage.com
DocumentRoot /var/www/mywebpage.com/public_html

<Directory /var/www/mywebpage.com/public_html>
Options -Indexes +FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/mywebpage.com-error.log
CustomLog ${APACHE_LOG_DIR}/mywebpage.com-access.log combined
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =mywebpage.com [OR]
#RewriteCond %{SERVER_NAME} =www.mywebpage.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>I disabled the default virtual host

Code:# disable the default
sudo a2dissite 000-default.confI enabled my virtual host

Code:# enable the new virtual host
sudo a2ensite mywebpage.com.confI reloaded apache2

Code:# reload apache2
sudo systemctl reload apache2
Any tips about why the webpage name won't work, but the ip4 number works please??
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments