- Set up a virtual host
- Configure your hosts file
httpd-vhosts.conffile. On XAMP, you can find this file here:
C:\xampp\apache\conf\extra\httpd-vhosts.conf This stepprepares the Web server on your computer for handling
symfony.localrequests. You need to provide the name of the Virtual Host as well as the root/main folder of your website. To do this, add the following line at the end of that file. You need to change the
DocumentRootto wherever your main folder is. Here I have taken
/Applications/MAMP/htdocs/Symfony/as the root of my website.
DocumentRoot "/Applications/MAMP/htdocs/Symfony/" ServerName symfony.local </VirtualHost>
Configure your hosts file:
For the browser understand what
you need to edit the hosts file on your computer.
(if you're using WINDOWS 7, this file is in
## # Host Database # localhost is used to configure the loopback interface ## #... 127.0.0.1 symfony.local
Thats it. Now the configuration is completed.Note: you should replace the above ip address with your system ip address.
Finally, you have to change the base secure and unsecure urls in
core_config_data table.Then your url will be change from http:localhost/projecttohttp://127.0.0.1/project.