Local Facebook Development
One of the challenges of working on a Facebook or OpenSocial application is that two-way communications are required between the platform and the application server. This becomes a workflow hinderance because you have to constantly push your work out to a public server in order to test your changes. Here’s a simple solution.
- Shut down the web server on your public server.
- Configure your local machine to behave as if it were the public server.
- Create a reverse ssh tunnel from your local machine to the public web server on port 80.
That’s it. Requests for pages from the outside world will now be served transparently from your local machine. You can develop using your local filesystem and test without any unnecessary steps.
If you have multiple things running from a single web server, you can still do this. Instead of shutting down your pubic web server, create or modify your VirtualHost directive to use mod_proxy or mod_proxy_balancer to localhost:8080 or whatever custom port, then setup your reverse proxy from local port 80 to whatever custom port number your webserver wants.