从bash控制台重启服务器 [英] Restart server from bash console
问题描述
是否可以从浏览器中为PythonAnywhere
提供的bash
控制台内重新启动Web服务器?我已经搜索了一段时间,没有找到任何相关内容.
Is there any way to restart the web server from within the bash
console given in the browser for PythonAnywhere
? I have searched google for a while and have not found anything relevant.
推荐答案
在/var/www
中,每个Web应用程序都有一个文件.该文件的命名应使哪个文件适用于哪个Web应用程序变得显而易见.
There is a file for each of your web apps in /var/www
. The naming of the file should make it obvious which file applies to which web app.
类型
touch /var/www/<filename>
(其中< filename>是要重新启动的Web应用程序的文件名),服务器将注意到该文件的修改日期已更改,然后重新启动您的应用程序.
(where <filename> is the name of the file that is for the web app you want to restart) and server will notice that the modified date of the file has changed and restart your app.
这篇关于从bash控制台重启服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!