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 gren
- 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 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> <PHP 7.1.2/7.0.16/5.6.28/5.5.38/5.4.45/5.3.29> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.6.5.2> <MySQL Workbench>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-

Options: ReplyQuote

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