Download XAMPP Installer for WIndows and install with default settings.
If you get a warning in XAMPP saying Skype is using port 80, do the following:
- Stop all services and quit XAMPP
- Open Skype
- Tools -> Options -> Advanced settings -> Connection
- Uncheck “Use port 80 and 443 as alternatives”
- Run XAMPP as administrator
Setting up virtual hosts
- Stop all services in XAMPP
- Open Apache
vhostsfile located at:
- First add a default virtual host buy adding the following code to the end of the file
<VirtualHost *:80> DocumentRoot "C:/xampp/htdocs" ServerName localhost </VirtualHost>
This will stop the URL
http://localhost/ from redirecting to the first real virtual host we create. This is handy when you need to access a URL like
http://localhost/newsite/wp/wp-admin to install WordPress etc.
- Next follow the examples in the
vhostsfile and add this code to the end of the file after our default virtual host.
<VirtualHost *:80> ServerAdmin email@example.com DocumentRoot "C:/xampp/htdocs/benpearson" ServerName bp.benpearson ServerAlias www.bp.benpearson ErrorLog "logs/bp.benpearson-error.log" CustomLog "logs/bp.benpearson-access.log" combined </VirtualHost>
This code will create a virtual host for
- Create the folder
C:/xampp/htdocs/benpearsonand put a test
- Run notepad as an administrator
- Open the Windows
hostsfile located at:
C:\Windows\System32\drivers\etc\hosts(may need to select “All Files” to see the
hostsfile in the
- Add the following line to the bottom of the file (the space after the IP address should be a tab) :
- Start XAMPP Apache service.
- Go to
bp.benpearsonin a browser and you should see your test
Reference: How to set up XAMPP with virtual hosts (some instructions conflict with the above)