我configuration我的系统能够在我的机器上使用Apache部署Django的东西(Ubuntu 11.10)。我遵循http://blog.stannard.net.au/2010/12/11/installing-django-with -apache-and-mod_wsgi-on-Ubuntu-10-04 / 。一切都很顺利。我能够运行我在http://wsgi.helloserver上使用Django创build的url,也是在http:// hello。 djangoserver “。 现在我希望我能够通过LAN从另一台计算机(Windows Vista)运行相同的IP。我configurationIP后运行ifconfig Ubuntu 192.168.1.2和Windows 192.168.1.3使用我的Windows机器,我能够ping Ubuntu和恶作剧versa.Also我能够访问Ubuntu的本地主机使用Windows.ie try.php躺在Apache的家可以执行从Windows中击中“ http://192.168.1.2/trying.php ”然而现在我怎么得到“ http: //hello.djangoserver “从我的Windows机器上工作。 不得不提交url,因为我不允许发布超过2个url
编辑:在我的urls.py我一直在寻找“^你好/ $”这将调用相应的视图,在我的情况下hello.So在我的本地机器“ http://hello.djangoserver/hello ”工作正常。 现在,这就是我想要做的。在我的另一台机器(Windows),我通过局域网电缆连接,我希望能够运行“ http://hello.djangoserver/hello ”或192.168.1.2 / hello哪些目前不工作。所以将肖恩的答案https://serverfault.com/a/340154/103875工作?如果是的话如何? 谢谢
该文档中/etc/hosts文件的更改允许假主机名正常工作。 为了在Windows系统上工作,你也需要修改它的hosts文件。 它位于C:\windows\system32\drivers\etc\hosts 。