WHAT'S NEW?
Loading...
Showing posts with label Developers. Show all posts
Showing posts with label Developers. Show all posts

This tutorial will teach you how to simulate live server into your own local PC using Xampp.

First:

Go to your "Window/System32/driver/etc" Folder, and look for the "host" file. Edit the file and add this ("127.0.0.1   mySite") in the bottom on the line, then save.

Second:

Go to your "xampp/apache/conf/extra" and look for this file "httpd-vhosts.conf", After locating file,
uncomment the "NameVirtualHost *:80", And then add the following at the bottom.


    DocumentRoot "C:/xampp/htdocs/calcdim"
    ServerName calcdim
    ServerAlias calcdim
 
    Order allow,deny
    Allow from all
    AllowOverride all

Third:

Go to "Xamp/Apache/Conf" and look for "httpd.conf" file.Find the following:

LoadModule vhost_alias_module modules/mod_vhost_alias.so
Include "conf/extra/httpd-userdir.conf"

if commented, please uncomment it by removing the "#" character.

Fourth:

Create a folder named mySite inside your "xamp/htdocs". After creating the folder, create index.html to test if it is really working.

Fifth:

Restart your apache to opening xampp control panel.

Last:

After restarting the apache, type mySite in your browser to text where its working.

So, these the 6 easy steps on how to create a real server in your own local PC. This is very useful to avoid incompatibilities when the code is uploaded to the server. Thank you.