Set Up a Local Facebook Development Environment with Virtual Host .

To create a facebook application , 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

Server configuration:

<VirtualHost *:80>
DocumentRoot /www/ myfbapps

# Other directives here


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 :

  1. This is a good way of setting up a FB dev environment. I usually just create a separate folder under the root level of my web server, but this can get quite messy (especially when hosting multiple apps on the same server)

  2. @McMahon Yeah to use virtual host is bit more easy process. And it makes faster to develop the application.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

%d bloggers like this: