WAMPServer 3 Create a Virtual Host, the easy way
Posted by: RiggsFolly (Moderator)
Date: May 14, 2017 04:04PM

Wampserver 3 - Create or add a VirtualHost

With Wampserver 3, you can create a VirtualHost with few clicks.
For ease of explanation, here are some names:
- sitefolder : folder in which you want to host the local site
- sitename : name that will be called the local site (http://sitename/)

First, choose where we want to host your local site, it can be a folder in Wampserver as wamp/www/sitefolder/ but this is not mandatory; this host folder can be anywhere on the hard drive, avoiding the paths comportants spaces; for simplicity of explanation we choose c:\sitefolder\.
We need the folder to host the site exists before creating the VirtualHost, we must create it whith File Explorer, launched as administrator(See bottom of page *) :
- Move in the disk tree to where we want to create the folder "sitefolder"
- Right-Click, New -> Folder
- Then type the folder name

- Lauch Wampserver, wait for icon W green
- Wampmanager Icon -> localhost
We arrive on the home page Wampserver, without Your VirtualHosts menu in the lower right (This is normal, just after installing Wampserver)
- Click Add Virtual Host in your Tools menu at the bottom left
We arrive on the Add Virtualhost page in which it is required to validate the VirtualHost submenu, then:
- Right-Click Wampserver Icon -> Wamp Parameters -> VirtualHosts submenu

We reload the Add VirtualHost page via the options of the browser or by clicking on the link at the top Add a VirtualHost
There, a green border box message indicates things to do, no problem, it'll be all alone if you click on the large button down, noted:
- Click on "Start the automatic correction of errors inside the green borders panel"
Arriving there, everything is ready in order to create his first VirtualHost
- In the form
-- For « Name of the Virtual Host No diacritical characters (éçëñ) - No space - No underscore(_) », we type:
-- For « Complete absolute path of the VirtualHost folder Examples: C:/wamp/www/projet/ or E:/www/site1/ », we type:
And validates the form by the button:
- Start the creation of the VirtualHost
As stated: It can take some time.

After this "time" it is stated that unfortunately certain operations required for the recognition by Windows and and Apache of this new VirtualHost can not be performed automatically by the browser, so, as shown:
- Right-Click Wampmanager Icon -> Tools -> Restart DNS
Wait until the icon turns green.
Click on Back to home
You now have Your VirtualHost Your menu, at right with such items:
- localhost
- sitename
Likewise, you also have this submenu Your VirtualHosts with Wampmanager icon.

Now everything is ready to set up your local site in the folder c:\sitefolder\ indicating, if required during the installation, that the URL is (http://sitename/) (Without parentheses).

Nota 1 : This procedure was written in real time from a blank installation Wampserver.
Nota 2 : This is a hundred times longer to write than done!

*To launch an application, via its shortcut, as administrator :
- Right-click on the shortcut, Properties
- Shortcut tab
- Advanced button
- Select Run as Administrator
- OK, Apply, OK

(Windows 10 Pro 64bit) (Wampserver 3.1.7 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Edited 1 time(s). Last edit at 12/03/2017 11:56AM by RiggsFolly.

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.