Skip to content

Instantly share code, notes, and snippets.

@abdulbasit-dev
Last active January 24, 2023 17:45
Show Gist options
  • Save abdulbasit-dev/b71466455e0f733c06bec1092ec13020 to your computer and use it in GitHub Desktop.
Save abdulbasit-dev/b71466455e0f733c06bec1092ec13020 to your computer and use it in GitHub Desktop.
Add Vertual Domain In Xampp In Windows

Add Vertual Host

follow below stpes to add vertual host in xammp:

  • Go to C:\Windows\System32\drivers\etc open hosts file, in there add new line write: 127.0.0.1 domain.test
  • Go to C:\Windows\System32\drivers\etc open httpd-vhosts.conf file, in last line add those code and modify it according to your domain
<VirtualHost *:80>
    DocumentRoot "C:\xampp\htdocs\<path_to_run_folder>"
    ServerName <domain_name>
       <Directory "C:\xampp\htdocs\<path_to_run_folder>">
         options All
         AllowOverride All
         Require all granted
     </Directory>
</VirtualHost>

after this restart xampp server and you good to go 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment