Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am developing a facebook app in my htdocs folder in python. i am behind an ADSL Modem, then a Wireless Router.

I have a static IP. Now how do i get Facebook to reach me? In the connect and callback URLs what should I enter so that facebook can reach my htdocs folder? I am on a Mac. I am using Django.

I have my django server running on xxx.xxx.xxx.2:8080 for some reason it does not allow me to run on port 80 (as the tutorial suggested).

any help would be appreciated.

share|improve this question
add comment

2 Answers

Port 80: you need root privileges to do that, and the Apache server which ships with the Mac (as Personal Web Server or somesuch) will be using that port, if it's turned on, so you can't bind both the Apache and Django app at the same time. But you can configure Apache to use mod_proxy to reach the Django app.

Reaching you:

  1. you want an externally resolvable hostname so people can find where you are; if you don't have your own domain, start out with something like dyndns
  2. getting through to you: one or the other (or perhaps both) of the ADSL Modem and the WiFi router will be doing NAT to let you have multiple machines at home. You want to open a pinhole in the NATting device, pointing port 80 to one particular machine on the internal LAN. You'll also want to make sure that the DHCP server (part of the same device) always issues the same IP to that device, so lock that MAC address in to a particular IP.

Finally: a popular FB app will absolutely kill your home network connection and one machine will not be able to host it, so while what you're doing might be fine for initial development work, if it looks like the app will be popular you'd better be prepared to spend quite a bit of money on professional hosting.

share|improve this answer
add comment

In your router's settings, look for a feature called port forwarding. If your router doesn't show your external IP, you can use whatismyip.org. Put your IP address in the connect and callback URL along with the port, example: http://10.10.10.10:8080.

Point port 8080 to your internal IP in the router:

alt text

Ensure your Mac has a static address. You should also put a DHCP exclusion in the router for the Mac so no other nodes take that IP.

share|improve this answer
    
from whatismyip.org, say my ip is xxx.yyy.zzz.10. i should put that in facebook connect and callback urls? and then in my router config, i should forward the ports (for example, 8080-8085) for the IP xxx.yyy.zzz.10? did i get it right? –  amit Dec 15 '09 at 18:37
    
the above configuration didnt work. –  amit Dec 15 '09 at 18:42
    
For the facebook URLs, ensure your port is in there as well, xxx.yyy.zzz.10:8080 –  John T Dec 15 '09 at 18:47
    
yes it is. also since the IP xxx.yyy.zzz.10 is the IP my ISP gave me (and hence goes to the wireless router), how do i get my server to serve calls made to this IP address. i am on my macbook connected wirelessly to the whole setup? –  amit Dec 15 '09 at 18:49
    
Opening the ports should allow your Mac to serve callbacks to that IP, given the port is forwarded correctly. Check to ensure your router is not configured for remote management, as that will also use port 8080 by default. –  John T Dec 15 '09 at 18:58
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.