![]() ![]() Note: Change your project's host name and root folder based on your need but don't forget to follow the steps mentioned. Now since you have enabled the virtual host, you also need to enter the local host details in the nf which is located under folder "C:\wamp\bin\apache\apache2.4.9\conf\extra". Last but not the least, How to access localhost? Watch the complete video guide on YouTube. Step 4: Restart all services in WAMP and now you should be able to access the index.php located in your project root directory by typing the v in the browser's address bar. Load 7 more related questions Show fewer related questions Sorted by: Reset to default Know someone who can answer Share a link. ![]() 1 Unable to browse virtual host with WAMP. Enter the below lines into it and then save it: 127.0.0.1 v 1 Default localhost cant be accessed after installing virtual hosts on WAMP. open notepad application in administrator mode and open the file "hosts" located in the above mentioned directory. Step 3: Change the windows host file located at "C:\Windows\System32\drivers\etc". Now this entry will enable the virtual host to redirect to your custome folder which is outside of the wamp installation directory and you can access your web root by typing v in the browser address bar. So the configuration should be added to the file is: Lets assume that your host name is v and your project root folder is "d:\projects\example\www\". Here you need to add the entry of your custom host accordingly. Step 2: Update the virtual hos configuration file nf which is located under folder "C:\wamp\bin\apache\apache2.4.9\conf\extra". In this step you have actually enabled virtual host feature in WAMP's Apache server. So after the change the above two lines will look like: # Virtual hosts You need to uncomment it i.e remove the # from the Include command. Initially the virtual host inclusion is commented. Open the nf file usually located at " C:\wamp\bin\apache\apache2.4.9\conf" and find the below settings: # Virtual hosts Step 1: Enable the Virtual host configuration in Apache's nf file. To access the virtual hosts, left-click on the WAMP desktop icon, hover over 'My VirtualHosts', then choose which one to load.Setting up virtual host in WAMP server involves the below steps: To add another virtual host, just go back to the 'Add a virtual host' page and fill out the first two fields. There is no limit to the number of virtual hosts that can be added. After a few minutes you will see the newly created virtual host listed near the top of the page. ![]() Click on the 'Start the creation of the VirtualHost' button. For myself I have one of my virtual hosts pointed to my git repository. This file is typically located at C:/wamp/bin/apache/Apache2.2.17/conf. The files can be anywhere on your computer they don't necessarily need to be inside the wamp folder. For example if you type in 'newwebsite' as the name then the new domain's URL will be: In the second field put in the location where the website files reside on your computer. Whatever you type in will serve as the URL. First type in the name of the virtual host you want to add. Open WAMP Server on your local Windows PC. On the next page you need to fill out two fields. How to add a virtual host in a local Wamp server Navigate to the location ‘C:WAMPServerbinapacheapache2.4.39confextra‘ and open the file, ‘nf‘ with your code editor of choice (In this article I used Windows default Notepad for editting the file). See the screenshots below.Ĭlick on 'Add a virtual host'. It also includes information on virtual hosting and setting up a secure web server. Scroll down to the bottom of the page and look for the subheading 'Tools'. The heading at the top of the page will say 'Server Configuration'. If the icon is red then WAMP is not running correctly and you will need to troubleshoot the issue before continuing.Ĭlick on Localhost. Start WAMP and left-click the green WAMP desktop icon. I thought I share these instructions for those who weren't aware WAMP can add a virtual host in a couple of steps. Googling how to add a virtual host in WAMP turns up outdated instructions. This feature is barely mentioned on WAMP's website. Now WAMP makes it easy to add virtual hosts and its free. One of the reasons why MAMP Pro has become so popular is it automates the task of adding virtual hosts. The process involved updating multiple files that were hard to find. Same VirtualHost in wampbinapache2.4. Setting up a virtual host in the past was tedious and time-consuming. MD5:aNULL:eNULL:EXP This is the Apache server configuration file providing SSL support. The ability to have multiple domains running on a local server can be accomplished with virtual hosts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |