Set Up a Local Facebook Development Environment with Virtual Host .
To create a facebook application http://www.londatiga.net/it/how-to-create-facebook-application-with-php-for-beginner/ , you need a real domain for Canvas URL. For that reasons I have faced a real trouble to develop Facebook application . I have to change the code on the local machine, uploading them to the server, testing it out in a browser and repeating the process until finish the application. So Even a little change i have to do all above the process . So i am looking for the best way to set up facebook development Environment in local to avoid all irritating process .And finally i found out of box solution at the leevio . Here i describe the out of box solution .
Create Only Virtual Host :
1. Just only create a virtual host in the localmachine according to you canvas domain name.That’s it nothing need to do more . It will save all of your effort and time Like you set canvas url “myfbapps” .
Here is the instruction to create a virtual hosts at ubuntu . But you can create virtual host for any os
1. Open a new file and write down the server configuration
<VirtualHost *:80> DocumentRoot /www/ myfbapps ServerName local.myfbapps.com # Other directives here </VirtualHost>
2. Then save the file to /etc/apache2/sites-available. Give it a name like myfbapps
3. And then edit the file hosts under etc directory : /etc/hosts
4 . Open terminal and type the following command or copy and paste it.
sudo a2ensite smronju //change smronju to your file name.
5. Now you have restart your apache server the following command.
sudo /etc/init.d/apache2 restart
Few more reference link :