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 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:
sitename-- For « Complete absolute path of the VirtualHost folder
Examples: C:/wamp/www/projet/ or E:/www/site1/ », we type:
c:\
sitefolder\
-- If you want to use PHP in FCGI mode
Check to use a PHP version other than the default.
Choose the PHP version you want from the drop-down menu
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
---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>Read The Manuals Apache --
MySQL --
PHP --
phpMyAdminGet your Apache/MySQL/mariaDB/PHP ADDONs here from the
WAMPServer alternate Repo-X-X-X-
Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-
Edited 2 time(s). Last edit at 08/24/2023 08:31AM by Otomatic.