Wampserver 3 - Create or add a VirtualHostWith 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
Arriving there, everything is ready in order to create his first VirtualHost
- In the form
-- For « Name of the Virtual Host No space - No underscore(_) », we type:
sitename-- For « Complete absolute path of the VirtualHost folder
Examples: C:/wamp/www/projet/ or E:/www/site1/ », we type:
c:\
sitefolder\
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
-
sitenameLikewise, 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
------------------------------------------------------------------------------------------------------------
Wampserver 3.3.0 32 bit - Apache 2.4.54.2 - PHP 8.2.4…7.4.33 - MySQL 5.7.40 - MariaDB 10.5.13/10.6.5
Wampserver 3.3.0 64 bit - Apache 2.4.54.2 - PHP 8.2.4…7.4.33 - MySQL 5.7.40/8.0.31 - MariaDB 10.5.17/10.10.2
PhPMyadmin 5.2.1 - MysqlDumper 1.24.5 on W10 Pro 64 bit
Documentation Apache -
Documentation PHP -
Documentation MySQL -
Wampserver install files & addons« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »
Edited 1 time(s). Last edit at 01/23/2020 01:09PM by Otomatic.