如何在本地django服务器上设置SSL来测试Facebook应用程序? [英] How to setup SSL on a local django server to test a facebook app?

查看:309
本文介绍了如何在本地django服务器上设置SSL来测试Facebook应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我点击 http:/时,我都配置了本地计算机的HOSTS配置来访问本地服务器(@ 127.0.0.1) /www.mydomain.com 在浏览器上。



我正在使用它与facebook的图形api进行交互来构建我的应用程序。但现在facebook要求我们有一个HTTPS网址或者更确切地说是一个SSL安全网址与他们的api进行交互。



所以问题是 - > 如何设置本地django服务器上的SSL?

解决方案

简短的回答是你需要在你的网站上设置一个合适的网络服务器开发机器。使用你最熟悉的任何一个(Apache,nginx,cherokee等)。



更长的答案是django开发服务器(管理。 py runserver )不是为了做SSL等而设计的,并且努力做到这一点可能比你想要花费更多。



<请参阅django-users列表中关于此passim的讨论: http://groups.google.com/group/django-users/browse_thread/thread/9164126f70cebcbc/f4050f6c82fe1423?lnk=gst&q=ssl+development+server#f4050f6c82fe1423


I've configured my local machine's HOSTS configuration to access the local server ( @ 127.0.0.1 ) whenever I hit http://www.mydomain.com on the browser.

And I was using this to interact with facebook's graph api to build my app. But now facebook requires us to have an HTTPS url or rather an SSL secured url to interact with their api.

So the question is -> How do I setup SSL on a local django server ?

解决方案

Short answer is you'll need to setup a proper webserver on your development machine. Use whichever one (Apache, nginx, cherokee etc) you're most familiar with.

Longer answer is that the django development server (manage.py runserver) isn't designed to do SSL etc and the effort to make it do so is likely greater than you'd want to spend.

See discussions of this passim on the django-users list: http://groups.google.com/group/django-users/browse_thread/thread/9164126f70cebcbc/f4050f6c82fe1423?lnk=gst&q=ssl+development+server#f4050f6c82fe1423

这篇关于如何在本地django服务器上设置SSL来测试Facebook应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆