vps:baresitetest

bare site test

baresitetest.sh
  1. mkdir -p /tmp/testsite
  2. echo "hello from server $(date)" > /tmp/testsite/index.html
  3. cd /tmp/testsite
  4. nohup python3 -m http.server 80 --bind 0.0.0.0 > /tmp/http.log 2>&1 &

Non-superuser may not have access to 80 port, use sudo then.

To kill the thread, get its pid via

ps aux | grep "python3 -m http.server" | grep -v grep

and then terminate the task using

kill <pid>

or

kill -9 <pid>
  • vps/baresitetest.txt
  • 最后更改: 2026/06/23 14:35
  • xiaobenmao