commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Very simple web server listening on port 80 will serve index.html file or whatever file you like pointing your browser at http://your-IP-address/index.html for example.
If your web server is down for maintenance and you'd like to inform your visitors about it, quickly and easily, you just have to put into the index.html file the right HTML code and you are done! Of course you need to be root to run the command using port 80.
There are 5 alternatives - vote for the best!
-k, --keep-open will keep connection alive, and we could exclude using 'while true'
nc is such a powerful command, it could be used instead of any OS! :p
If you can do better, submit your command here.
You must be signed in to comment.