我有Vagrant/VirtualBox运行Ubuntu 12.04 LTS OS.我已将Vagrant配置为将来宾端口8000转发到我的主机端口8888.
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 8000 => 8888 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
Run Code Online (Sandbox Code Playgroud)
当虚拟机启动时,我在端口8000上启动Django dev服务器.
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Run Code Online (Sandbox Code Playgroud)
好的,我可以把它放在后台,我甚curl localhost:8000至可以从服务器获得一些输出
<div id="explanation">
<p>
You're seeing this message because you have <code>DEBUG = True</code> …Run Code Online (Sandbox Code Playgroud)