- Go to Apache Friend's website and download Apache for windows
- Select components want to setup
- Choose folder want to install xampp
- After installed, you can change directory root folder or use default htdocs in Xampp's folder.
Change directory root folders
- Go to path:\xampp\apache\conf\httpd.conf and change folder to directory you use.
Change to
DocumentRoot "D:/projects"
<Directory "D:/projects">
Then restart xampp and run file.php in projects folder to test.
- Go to path:\xampp\apache\conf\extra\httpd-vhosts.conf and insert config.
<VirtualHost *:80>
DocumentRoot D:/projects/theright
<Directory D:/projects/theright>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ServerName virtualconfig.com
</VirtualHost>
Note: You can learn more config on Apache Docs
Add server name
127.0.0.1 virtualconfig.com
to file hosts on windwows:
C:\Windows\System32\drivers\etc
Then restart xampp and run to view result.






