Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Django服务器作为Windows服务_Django_Windows_Cmd_Windows Services - Fatal编程技术网

Django服务器作为Windows服务

Django服务器作为Windows服务,django,windows,cmd,windows-services,Django,Windows,Cmd,Windows Services,我有一个运行Django服务器的批处理文件,它工作得非常好 c:\Python27\python.exe manage.py runserver 8003 我正在使用第三方应用程序NSSM 将批处理文件作为Windows服务运行。 关键是服务不会启动服务器。如何使用此服务运行服务器;服务将打开cmd并执行命令。 如果我使用另一个第三方应用程序,或者是否有任何命令可以添加到我的批处理文件中并将其更新为serive如果您想将django作为Windows服务运行以进行开发(请参见上面的评论),我很

我有一个运行Django服务器的批处理文件,它工作得非常好

c:\Python27\python.exe manage.py runserver 8003
我正在使用第三方应用程序NSSM

将批处理文件作为Windows服务运行。 关键是服务不会启动服务器。如何使用此服务运行服务器;服务将打开cmd并执行命令。
如果我使用另一个第三方应用程序,或者是否有任何命令可以添加到我的批处理文件中并将其更新为serive

如果您想将django作为Windows服务运行以进行开发(请参见上面的评论),我很幸运地使用了instsrv和srvany,这两种Windows工具都可以在所有Windows平台上运行。有关详细信息,请参阅。

您不能在生产环境中使用开发服务器。使用合适的web服务器,它已经知道如何将自己作为服务启动。