I posted this question before but I guess it wasn't clear the way I wrote it or something. So I deleted it and here it is again with as much info as I can think of.
I created a server using old computer parts of a dell dimension 2400. I installed Ubuntu 16.04.6 LTS with Linux 4.15.0-72-generic kernel. I installed mysql-server, apache2, certbot, pyton3, python-apache-certbot, php7.0, ssh, vsftpd and then forwarded the required ports for what I installed to the internal ip. (192.168.1.23).
Then I setup a wordpress site on the server. The problem is I setup the virtual host file (can be seen below) but for the site to work I have to use the network internal ip for the site to load.
Here is the virtual host file:
<IfModule mod_ssl.c>
<VirtualHost 192.168.1.23:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/domain.com/public_html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
ServerName domain.com
SSLCertificateFile /etc/letsencrypt/live/domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/domain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
~
Keep in mind this is the working virtual host.
When I change this to the domain name (domain.com:443) as it should be it doesn't work.
(Same issue on port 80.)
Do I need an internal dns or is it something else?
I tried installing bind but either I botched it up horribly or it wasn't the case ... or both ... leaning more toward both honestly.
anyway I hope this is enough info and someone is able to shed some light on this. I would like to be able to host another site on this server.