The purpose of this tutorial is to create fake domain name on localhost, i.e. you are running your local website online:
1. Create folder which will serve as your Web applications directory. You can place Web applications as many as you want in this folder. In my case:
2. Suppose I want to develop my Web application or website whose domain is j2technologies.com, then I'll create folder inside the above-created working directory and name it:
3. I will now create 2 new folders inside j2technologies.com folder:
conf is where configuration will be placed and public_html is where web documents will be placed. Index file, either index.html or index.php, should be on top of public_html.
Hence, C:/workspace/www/j2technologies.com/conf and C:/workspace/www/j2technologies.com/public_html.
4. You should place or extract (like joomla, wordpress, phpbb, drupal, etc) your web files on top of public_html, i.e. index file should be in public_html.
5. Open your favorite text editor. I suggest Notepad. Type in the following and save as conf.conf (not .txt) inside folder conf:
CustomLog "logs/j2technologies.com-access.log" common
Allow from all
6. Open Apache httpd.conf configuration. At the last line add the following:
7. Then add also the following:
Save and close Apache httpd.conf configuration.
8. Open hosts file in Notepad. hosts file is located at C:\Windows\System32\drivers\etc. Yes, it does not have extension. At the last line, type in the following:
If this file is edited for the first time, you may save it first in Desktop with the same name without extension, hosts. Then copy this to C:\Windows\System32\drivers\etc to overwrite existing hosts file.
8. Restart Apache. You should be able to open your site with www.j2technologies.com or j2technologies.com.
Download PDF file.
Thanks. Suggestions and comments are highly appreciated.