projectz

Tech, Gadgets, Photography, Social Media and Poor Spelling

Question: What is the quickest way to setup a webserver on Linux?

Want to quickly share a file with someone? Set up your own web server in a few keystrokes with this handy command:

python -m SimpleHTTPServer

Just like that, your current directory will be shared. Here’s what it looks like in a web browser:

linux command line

Naturally, you’re going to need to set up your router properly if you want to share with someone outside your current network. A dedicated IP or a service like DynDNS will also be needed. Still, for local file sharing, it’s hard to beat the above command: it’s quick and easy. It worked for me on Ubuntu and OS X.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on October 30, 2011 by in regular and tagged , , , , , .
%d bloggers like this: