The question was how can we provide a valid domain name to this application, which is installed on the local machine, assuming that we don't have bought an domain name?
The answer for this question is that we set up a virtual host which points to 127.0.0.1 which is the localhost.
If we presume that we run Apache server on Windows machine, here are the short steps of how to do this virtual host:
1. Configuring Apache
Locate and edit Apache httpd.conf file by adding the next lines at the end of the file (e.g. apache_home_folder/conf/httpd.conf):
DocumentRoot "C:\My Sites\Site1"
Note 1: If the above path for DocumentRoot does not have any spaces in it, do not quote the path.
Note 2: Starting with Apache 2.2, the above modifications should be made in httpd-vhosts.conf file, which will be located in the extra folder (e.g. apache_home_folder/conf/extra/httpd-vhosts.conf). Also make sure that the line:
is uncommented in httpd.conf file.
It is also needed to add the next lines to httpd-vhosts.conf file:
Allow from all
then add the NameVirtualHost 127.0.0.1 ... lines.
2. Resolving the DNS issue
Locate the file
At the end of this file add the following line:
and save the file.
If you cannot save the file, run the editor with administrator permissions (right click on the editor and select Run as Administrator option) and then open the file in the editor.
3. Restart Apache server
All you have to do now is to restart the Apache server and test the virtual host in your browser: http://domain_name.com