Skip to content

Webserver, simpel

python -m SimpleHTTPServer

Der Befehl startet einen Webserver, der das aktuelle Verzeichnis über Port 8000 freigibt.

~# python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...

Man kann also nun über http://<adresse>:8000/ auf das Verzeichnis zugreifen. Da Python quasi überall vorhanden ist, werden keine weiteren Freigaben oder Software benötigt. Nicht einmal root Rechte braucht man dafür.

Wer einen anderen Port bevorzugt, kann diesen noch dahinter angeben:

python -m SimpleHTTPServer [port]

So etwas ähnliches gibt's auch in Bash, die obige Lösung finde ich aber einfacher.

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment

Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.
BBCode format allowed
You can use [geshi lang=lang_name [,ln={y|n}]][/geshi] tags to embed source code snippets.
Form options
tweetbackcheck cronjob