Creating Virtual Hosts on XAMPP
To create virtual hosts on XAMPP, follow these steps:
1. Update Hosts File
Add the following entries:
127.0.0.1 localhost 127.0.0.1 [Host Domain Name]
2. Configure Virtual Host
Open xampp\apache\conf\extra\httpd-vhosts.conf and add the following block:
DocumentRoot "C:/xampp/htdocs/[Host Domain Path]" ServerName [Host Domain Name]
3. Uncomment Virtual Host Module
In xampp\apache\conf\httpd.conf, scroll to the Supplemental configuration section and uncomment the following line:
#Virtual hosts Include conf/extra/httpd-vhosts.conf
4. Restart XAMPP and Access Virtual Host
Restart XAMPP and access the virtual host in your browser by entering the Host Domain Name as the website address.
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3