Likewise, you also have this submenu Your VirtualHosts with Wampmanager icon. You now have Your VirtualHost Your menu, at right with such items: Right-Click Wampmanager Icon -> Tools -> Restart DNS For « Complete absolute path of the VirtualHost folder Examples: C:/wamp/www/projet/ or E:/www/site1/ », we type:Īfter 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: For « Name of the Virtual Host No diacritical characters (éçëñ) - No space - No underscore(_) », we type: Click on "Start the automatic correction of errors inside the green borders panel"Īrriving there, everything is ready in order to create his first 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: We reload the Add VirtualHost page via the options of the browser or by clicking on the link at the top Add a VirtualHost Right-Click Wampserver Icon -> Wamp Parameters -> VirtualHosts submenu We arrive on the Add Virtualhost page in which it is required to validate the VirtualHost submenu, then: Click Add Virtual Host in your Tools menu at the bottom left We arrive on the home page Wampserver, without Your VirtualHosts menu in the lower right (This is normal, just after installing Wampserver) Lauch Wampserver, wait for icon W green Move in the disk tree to where we want to create the folder " 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 *) : sitename : name that will be called the local site ( sitename/)įirst, 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\. sitefolder : folder in which you want to host the local site With Wampserver 3, you can create a VirtualHost with few clicks.įor ease of explanation, here are some names: You’ll want to change those addresses to match your needs.Wampserver 3 - Create or add a VirtualHost Now you should be able to see both localhost and mysite from The reference to c:\MYSITE is the directoryĬreated to host the files and folders for the new virtual host you’ll need toĬreate that folder (you can place it wherever you need in the folder hierarchyĪfter you add the above code to the correct file, save it and restart your Site administrator is if you need to serve the virtual host on a non-standard port, change it (we’re sticking with our current example of “mysite”).ĬustomLog "logs/mysite-access.log" commonĪdd a directive for every virtual host you create. Open that file in Notepad and add the following section You should find this file in C:\wamp\bin\apache\Apache-XXX\conf\extra\ (XXX is The next file to edit cannot be accessed through the WAMP user interface Remove the “#” in the second line above and save and close the Out the entry for virtual hosts configuration file location. When you select the nf entry, Notepad will open with WAMP icon in the system tray and select Apache | nf ( Figure A). The fastest way to access this file is to right-click the Save the host file (making sure to not save it.Will map the virtual host name to an IP address. We’ll focus on oneįirst, you need to edit your hosts file on the server. Server (I assume the WAMP server is up and running, and you have administrativeĪccess to the files and folders on that machine). I’ll show you how to easily do both with a single WAMP Using virtual hostsĪllows you to, effectively, host more than one site on a single machine. The feature set translates - this includes virtual hosts. Lose much of the flexibility found on the Linux equivalent. Not only does it allow you to host a website using the world’s mostįlexible web server, it also allows you to do so on your Windows host.īut don’t think because you’re on a Windows host that you The Windows Apache MySQL PHP (WAMP) server is incredibly For more info, visit our Terms of Use page. This may influence how and where their products appear on our site, but vendors cannot pay to influence the content of our reviews. We may be compensated by vendors who appear on this page through methods such as affiliate links or sponsored partnerships. This simple example demonstrates how to get virtual hosts up and running quickly on your WAMP server.
0 Comments
Leave a Reply. |