Cannot access local webpage (error: could not resolve host)

As @George said, while there is no FQDN that points to your server's IP, you need to bind the domain name with the loopback interface - 127.0.0.1, through the next line in the /etc/hosts file:

127.0.0.1 localhost223.com

Then edit /etc/apache2/sites-available/test.conf in this way:

<VirtualHost *:80>

        ServerName localhost223.com
        DocumentRoot /var/www/test

        <Directory /var/www/test>
                Options None FollowSymLinks
                # Enable .htaccess Overrides:
                AllowOverride All
                DirectoryIndex index.html index.php
                Order allow,deny
                Allow from all
                Require all granted
        </Directory>

</VirtualHost>

Don't forgot to sudo a2ensite test.conf, then restart the web server:

  • Ubuntu 14.04: sudo service apache2 restart

  • Ubuntu 16.04: sudo systemctl restart apache2.service

Try to access your page through the browser.