{"id":468,"date":"2011-12-05T17:08:20","date_gmt":"2011-12-05T22:08:20","guid":{"rendered":"http:\/\/www.serverprontouniversity.com\/?p=468"},"modified":"2018-10-11T23:00:31","modified_gmt":"2018-10-12T04:00:31","slug":"support-of-the-day-the-worlds-most-dead-simple-http-server","status":"publish","type":"post","link":"https:\/\/www.serverpronto.com\/spu\/2011\/12\/support-of-the-day-the-worlds-most-dead-simple-http-server\/","title":{"rendered":"The world&#8217;s most dead simple http server"},"content":{"rendered":"<h1>Simple HTTP server<\/h1>\n<div><strong>1. Make sure your port 8000 is open<\/strong><\/div>\n<pre>Nano \/etc\/sysconfig\/iptables<\/pre>\n<div id=\"_mcePaste\">Copy any of the rules (ctrl +K is cut, ctrl+U is paste) and swap the port for 8000, save and close<\/div>\n<div id=\"_mcePaste\">Service iptables restart<\/div>\n<div><\/div>\n<div id=\"_mcePaste\"><strong>2. Go to the folder you want to share<\/strong><\/div>\n<pre>cd \/to\/any\/folder\/you\/want<\/pre>\n<div id=\"_mcePaste\"><strong>3. Fire up the server<\/strong><\/div>\n<pre>python \u00e2\u20ac\u201cm SimpleHTTPServer<\/pre>\n<div id=\"_mcePaste\">or<\/div>\n<pre>python -m http.server<\/pre>\n<div id=\"_mcePaste\"><strong>4. Go to http:\/\/yourip:8000<\/strong><\/div>\n<div>Further\u00c2\u00a0information:<\/div>\n<div id=\"_mcePaste\">This will act as a regular apache server, if on that folder is an index.html file, it will be displayed, otherwise, a list of the files on that folder will be shown.<\/div>\n<div id=\"_mcePaste\">To stop the server just press Ctrl + C<\/div>\n<div id=\"_mcePaste\">To send the process to the background add a &amp; symbol at the very end of any of the python commands<\/div>\n<div id=\"_mcePaste\">Otherwise, press Ctrl + Z and then type bg and enter<\/div>\n<div id=\"_mcePaste\">To stop the process when the above has been done just type:<\/div>\n<div id=\"_mcePaste\">Ps aux | grep python<\/div>\n<div id=\"_mcePaste\">Look for the first group of 4 or 5 digits and then type<\/div>\n<div id=\"_mcePaste\">Kill #####<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Simple HTTP server 1. Make sure your port 8000 is open Nano \/etc\/sysconfig\/iptables Copy any of the rules (ctrl +K is cut, ctrl+U is paste) and swap the port for 8000, save and close Service iptables restart 2. Go to the folder you want to share cd \/to\/any\/folder\/you\/want 3. Fire up the server python \u00e2\u20ac\u201cm<\/p>\n","protected":false},"author":2,"featured_media":2633,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[123,17,112,247,22,18],"class_list":["post-468","post","type-post","status-publish","format-standard","has-post-thumbnail","category-support-of-the-day","tag-cloud","tag-dedicated-server","tag-hosting","tag-http","tag-server","tag-web-hosting"],"_links":{"self":[{"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/posts\/468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/comments?post=468"}],"version-history":[{"count":14,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/posts\/468\/revisions"}],"predecessor-version":[{"id":2916,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/posts\/468\/revisions\/2916"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/media\/2633"}],"wp:attachment":[{"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/media?parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/categories?post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serverpronto.com\/spu\/wp-json\/wp\/v2\/tags?post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}