Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup django test server with port forwarding

I want to setup django test server so it can be accessed through web address (mainly for facebook testing). For this I'm using the no-ip service wich works fine with apache. But when I try starting the test server on port 80 access from the same web URL gives Problem loading page.

I've already concluded that the router is properly configured (port forwarding works with apache) and that the test server is running locally.

So what should I do? Do you have any suggestions about developing django project with facebook integration?

Thanks!

like image 644
prototype Avatar asked Dec 07 '22 11:12

prototype


2 Answers

I would also recommend using the localtunnel Ruby gem. It will provide you with a publicly accessible web address that routes requests to a locally bound port:

$ python manage.py runserver
$ localtunnel 8000
This localtunnel service is brought to you by Twilio.
Port 8000 is now publicly accessible from http://qw1e3.localtunnel.com ...

I prefer it over other approaches, especially in instances where even for development work your application is required to be publicly accessible due to some remote services that your using, in which case you can programmatically instantiate localtunnel and do all the necessary configurations, without having to document it or go through the pain of performing it manually over and over again.

like image 177
Filip Dupanović Avatar answered Dec 28 '22 01:12

Filip Dupanović


Are you running python manage.py runserver? Try doing python manage.py runserver 192.168.1.2:80 (or whatever your IP is instead of 192.168.1.2).

like image 41
Foon Avatar answered Dec 28 '22 02:12

Foon