LoginSignup
4
1

More than 5 years have passed since last update.

SimpleHTTPServer で外部アクセスを受け付ける

Posted at

外部アクセス可能なWebサーバを簡単に起動する

  • 動作確認のためにローカルホスト外からWebアクセスを受けつけたい時がある。
  • python が入っている場合は以下のコマンドでWebサーバを起動することができる(ファイアウォールでのポート開放は別途必要)
python -c "import BaseHTTPServer as bhs, SimpleHTTPServer as shs; bhs.HTTPServer(('192.168.1.1', 8888), shs.SimpleHTTPRequestHandler).serve_forever()"
4
1
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1