rula.blogg.se

Xampp localhost
Xampp localhost












In the terminal, on MAC and LINUX type ifconfig |grep inet, on WINDOWS type ipconfig. We first need to know the IP address on the computer that hosts the website (the one we've been working on since the very beginning). Well this is now easy! We just need to tell the other computers how they could find symfony.local! How do we do this?ģa Get the IP address of the computer hosting the website:

xampp localhost

How can I now access my website through an other computer? We finally arrive to your main question which is: It will understand that you want to work on localhost (127.0.0.1).ģ Access symfony.local from an other computer: # localhost is used to configure the loopback interfaceįrom now on, everytime you type symfony.local on this computer, your computer will use the loopback interface to connect to symfony.local.

  • On WINDOWS 10, this file is in \Windows\system32\drivers\etc\hosts.
  • On WINDOWS 7, this file is in \Windows\system32\drivers\etc\hosts.
  • On WINDOWS, this file is in \Windows\system32\private\etc\hosts.
  • On MAC, this file is in /private/etc/hosts.
  • The trick here is to append the following to your hosts file. If it can't, then it will ask DNS servers. It will do this by first looking into the hosts file on your computer to see if he can match an IP address to what you typed in the address bar. So it will try to resolve the name symfony.local to an IP address. Everytime you type an URL in your browser, your computer tries to understand what it means! symfony.local doesn't mean anything for a computer. ĭocumentRoot "/Applications/MAMP/htdocs/Symfony/"įor the client (your browser in that case) to understand what symfony.local really means, you need to edit the hosts file on your computer. Here I have taken /Applications/MAMP/htdocs/Symfony/ as the root of my website. You need to change the DocumentRoot to wherever your main folder is. To do this, add the following line at the end of that file.

    xampp localhost

    You need to provide the name of the Virtual Host as well as the root/main folder of your website.

    xampp localhost

    This step prepares the Web server on your computer for handling symfony.local requests. On MAMP, you can find this file here: Applications/MAMP/conf/apache/extra/nf.

    xampp localhost

    On XAMP, you can find this file here: C:\xampp\apache\conf\extra\nf. You first need to set up a virtual host in your apache nf file. Let's say you're a big Symfony2 fan and you would like to access your symfony website at from 4 different computers (the main one hosting your website, as well as a Mac, a Windows and a Linux distro connected (wireless or not) to the main computer. We'll take a general case with Apache here.














    Xampp localhost