Menu Close

Custom local URL instead of localhost in Xampp

We Suppose that you already install xampp , lets suppose we have a project named ‘project1’ in htdocs folder


we will access this by http://localhost/project1 and now we will change this to any custom URL

Open xampp\apache\conf\extra\httpd-vhosts.conf file in any editor like notepad and put following code in bottom

<VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs\project1"

Open new notepad as administrator

Open Windows\System32\drivers\etc\hosts file and put at bottom

save file and restart Apache Server

Thats it!

Now you will be able to access project by, if still facing any issue please contact at

Leave a Reply

Your email address will not be published. Required fields are marked *