Restart server from bash console

前端 未结 3 581
再見小時候
再見小時候 2021-01-14 12:02

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

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-14 12:11

    As quoted by harry, one of the people working at PythonAnywhere on the PA forum https://www.pythonanywhere.com/forums/topic/89/#id_post_4289

    touching the file at /var/www/you-domain-wsgi.py will reload your web app workers, so that will pick up on any code changes you've made, but be warned that it doesn't do the other stuff which the button does, in particular, it won't pick up any new static files directory mappings you've made.

    To perform a full reload, you can use this script on github.

    git clone https://github.com/ayys/pareload.git

提交回复
热议问题