4/03/2018

Using your Raspberry pi To Setup a webserver



Now there is various os options you have here, but so far I have only gotten any luck out of apache.
Now you can install php & mysql for it, but you need to install configuations for it...

Now What I tested these with was raspbian and arch.
With arch I could not get get mysql to install properly

I had no luck with any of the other options for web server hosting than apache, there are many others but they all ran into some kind of errors with their raspberry pi builds.(such as nginx)

So for the most part all you need is these commands

in raspbian:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install  ssh apache2 php5 libapache2-mod-php5 mysql-server mysql-client php5-mysql vsftpd
sudo service apache2 restart
sudo chown -R pi /var/www
ln -s /var/www/html ~


Now I will go over all these commands

Update & upgrade both make sure your applications are upto date and your OS is aswell.

Now install ssh apache2 esc.... installs all the nessary applications we are going to need, including php, mysql for databases, and vsftpd for a file transfer protocol. ssh will allow you to remote into it, and is only nessary to install if it isn't configured properly or not included with the install.

Then the service apache2 will restart your freshly installed apache. chown will apply ownership over a folder, and ln -s will create a link to your webservers folder it reads from in your home destination.





You will also need to atleast change your default user which is typically pi, you will need to change the password with the command

passwd pi

Now ssh should work properly to test it with you will need to install a ssh client on another device to test it with.


Now all you have to do to test this webserver is find its IP information out with ifconfig -a

and look for something like : "inet addr:10.0.0.18" your internal ip address will be different based on your router and how your network is setup. Once you do that type your internal ip address in to your web browser of choice and it should display a webpage.

Now you might want to make your site from here.

Once you want to publish it to the web you will need to setup your port forwarding on your router using this command
route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    202    0        0 eth0
0.0.0.0         192.168.2.1     0.0.0.0         UG    303    0        0 wlan0
10.0.0.0        0.0.0.0         255.255.255.0   U     202    0        0 eth0

192.168.2.0     0.0.0.0         255.255.255.0   U     303    0        0 wlan0

Now what you are looking for the gateway you are actually using, like in mycase it is eth0

so the routers IP is 10.0.0.1
So type that in your browser of choice and this point I can't help you after this because each router has its configuration options different.

Once you google search your routers default user login and look for your port forwarding options, you will need to forward port 80

Now you can forward port 21 & 22 if you so choose to which would be used for ssh & ftp.


Once you have all this setup you will either need to purchase a domain from a domain host and set it up to your IP.

This I can't help you with as each domain host is different. I would reframe from using something like freenoms service as they block out connections for "being too slow" which will heavily reduce your audience. 


 Once that is all done you will have your own website hosted on a $35 computer.
-----------------------------------------------------------------------------------------

Now this will work with a retropi so you can get multi-usage out of one pi, but the performance as a webserver & as a gaming machine will be hindered, and will heat up rather quickly if you plan on playing anything like n64 or dreamcast games.

Now what I think is the most interesting route is the command line envirorments, as you could possibly get more out of it that way. I tested it with arch linux and keep in mind this is the first form of arch I have ever touched, and I don't fair well out side of debian based linux distros usually. I got it setup faster than I did in raspbian, but of course that could have to deal with almost instant boot because no messy GUI system outside of text.

At anyrate the less resources you are using up the more you can get out of these things in terms of webservers and various other servers. The thing is they are stupid cheap and easy to setup.I honestly don't think half of what is said helps. I have seen people hint at minecraft servers but I do not find that game interesting much anymore.


No comments :

Post a Comment

Please be kind to others, and my self.

Rss Feed

Undeadbobop's blogs

↑ Grab this Headline Animator

My Other Blogs

FeedBurner

I heart FeedBurner

Labels

construct 2 Nintendo game review ouya wiiu windows android linux pc games google Microsoft Chrome free mac web scirra Dreamout controller development steam valve Sega chrome os chromebook play controls programming youtube game development #nintendo 2d Apple DRM Wii help store template Dream gaming music unity update video video games 3d GNU/Linux How to SEO bus chrome book construct custom driver gamepad menu out raspberry pi rush tutorial HTML5 Nintendo Switch bad cheap console experience javascript online software website xbox 360 Iphone Pokemon go amazon art assets code font gamejolt halflife iOS os retroarch sale sonic sound sprite support Genesis Mario Saturn Switch adventure app chromeos clone css down effects emulation engine fix internet level life nes opengl phone problems sega genesis source spritefonts spriter work 3ds Doom Game development companies in detroit Game review Mario Kart Megadrive Micro-transactions Playstation Sega Saturn Sony Sucks Ubuntu acer ad ads adsense adv advance atari book bugs c++ computer counter strike global offensive delay drawing emulator example free software gamestop gimp java kongregate modeling money network pack platformer project ripoff snes starter system undeadbobop web server webhosting windows 8 $oft 2014 Beginner C# Corsair DLC Developers Dreamcast Facebook Fishing NX Photoshop Retropi Scam Sega Genesis Ultimate Portable Game Player Tech Things USA Virtual abuse acer 11 adv menu advertisement application apps arcade best bing blog blue bobop build coin construct 2 gaming engine construct 3 construct2 counter strike crash csgo design develop directx face faceplate fps game development tools give away glitches gnu googleplay graphics hackers halflife 3 halo issues itch.io libretro lies link low make make money fast maps menus movie nvidia of optimization options patch php plate pokemon pool pro raspbian retropie screw security server sounds summer terrible tf2 top trirectimo up usb valve editor hammer virtual console voice vs web design wireless worst xbox 360 xml zelda 1 2 3 submit pro 2 25th Anniversary 5 AI America C# XNA Gamestudio CD Call of Duty Cast Comparison Controller Pro Controller Pro U Copy DVD Digital Direct Discs Dragon Drive East Detroit Eastpointe Eshop GBA Golden HTML ID Marker Microshaft Microsoft store in michigan Moore Mupen64 Nights Old PS2 Personal Peter Record RollApp Samsung Screenshots Secret Skateboard Sprite font Steam controller Super Mario TV VR review WoW XBL Zelda breath of wild abandon abandonware ad free advance menu system affordable alternative amd angry app development art work assault audio away balls bfxr block blogger bo's breaks brick bride bug bundle bungie bus driver 2d experience rush capture card cards cat character cheaters choice chrome web browser club color commercial connect contest convict convict gaming corruption cost counterstrike create crush dead demo depression descriptions download e3 easy education electric electronic email emulation station emulators event evil exploit family fast feed flac flash fonts fraud functions fx galaxy game development companies game development companies in michigan game engines gameplay gaming assets get gif give google chrome greed guide half halflife 2 head hl2 homebrew honest hosting improves information is issue item items jam jolicloud keyboard kick kickstarter kitten kitty lag lan learning liars lock making manager map menu system micro milkshape 3d minecraft misleading mobile mods monogame multiplayer netplay networking new news noncommercial not odd off one paint pewdiepie pie players playing plugins port program quake quick random red remote require rewards rip road save saving screen screenshot script sdl search sega dreamcast settings site skate skeleton small snapshot song sprite sheet spyware steam box steam gamepad steam os steamos strike team templates terrorists text tic tac toe to tool tools top 10 touch tree unreal use version video game videogame vidme ware web server ultimate webgl webmaster websites webstorage webstore wedding world xbone xbox one xboxdone xboxone zombies #e3 10 10 ways 200 2015 2600 3.14 343 3:4 ratio 3DTin 3d modeling 5 nights 64 7 7th guest 8 90 AAC AIFF API ARM AT&T ATT AVGN Ace Adriano AlphaOmegaSin Amiibo Android disable ads in games Animation Backlinks Balmer Batdan Bernie Bethesda's New Review Copy Policy Bill Blackjack Blackmail Bluetooth Boarding Bros Bully C++. directx CD Audio COPPA Cities Classic Computers Consoles Cool Corruption in gaming news journalism Creators Cyanara DDOS DMCA DMZ DNS Deluxe Detroit Documentations Dogs EA EU EULA Eco Edge gamepad Edition Emio Encore F.E.A.R. FCC Fanboy Feminism First person shooter Flowcharts Footage GPL Game development companies in michgian Gamer Gates Gear VR Genesis Ultimate Portable Game Player God Gold Google maps Grammar HD HDMI HP HTC Vive Halo 2 Halo 2 Anniversary Halo 2600 Halo Reach Halo legends ICEY ID Tech IDE IE IGN IOS 9 ISP IT Impact Impressions Install Irate Irategamer Japanese Jet pack Jim Kainy Kart Kim Jong-un Knuckles Kotaqu LG LGBT Las Vegas Last Launch Lenovo Library Linksys Lucid Lycoming mall MP4 Mad Mad over Mario Galaxy Mario kart 8 deluxe Mario odyssey Marker sprite font Media player Metro Michigan Microsoft wordpress Monodevelopment Moon Mortal Kombat Mote Movies Musepack Mysterious NSA Navel Nes classic Next Nintendo 64 North Korea November OC OS X OSX Ocarina Ohio Omega On off switch Onedrive Paradise Paths Performance Pokken tournament Pokken tournament Pikachi controller Privacy Badger Projared Promotion Pygames Pyshell Python Python Fiddle RPG RSS Rage Reach Released Remix Retrobit Retroduo Retrogen ReviewTechUSA Rock Rock Paper Shotgun Rockstar Roseville SMM SQL SWF SWJ Scholarship Shaft Ship Sin SkyDrive Smash Sonic 3d blast Speex Star Starling Steven Stolar Sun Super Mario Maker Super Smash Bros Tails miles Text adventure The Interview The Letter Tony Hawk Total Media Town TreeFall Studios Treehouse Tuner Twitch UML US Ubisoft VBA VLC Valor Vegas Vengeance Video game art Visio Vorbis WAV WMA Watch Watchdogs WavPack Wino WoW! Woofle XBLA Zilla accessories accounts achievements acting adapter adblock add on admin adreno advertisers airplane algorithms alone alpha always amazing amazon app store android development animal animate animated animations anime app developer in detroit Michigan appegg appspotr arch array ashleey asus atgames attack audience auto back back links background badges bag bags ball ballz bandicoot banks bar base basic basics basketball battery battle. DLC. link bayonetta beating bed bgoat big bios bioshock birds birthday bit bites black blackberry blacklist blade blast blender blockstorm bloodmoon blur bo boom bored borkin button boxes boy bricks broke broken brotherhood browser bsd buck bucks buggy bust buy c++. html c64 cable can can't canceled candy capcom car care caret-t caster cb3-111 cereal chair challenges change cheating checking chrome cast chromebooke chromecast app clara clara.io classical clearance client closure compiler cloud applications cloud computing cocoonjs code envy coding college colour comedy command comments community compatibility competitive market compile compiler complaints complete roms list computer AI connect 4 connecting cons constroller construct 2 gaming engine plugin construct 2 holiday plugin construct 2 plugin construct 2 time and date plugin content costume couch counter counter strike condition zero counter terrorists court cpu crafting crap crazy crd creating creation creativity credit crossing crusher ctf cubes cue curse cursor customization templates cylinders daniel date object dbz deathmatch dell demonetization desert desktop desura develoming developing development kit dial dialup died difficult dig disabilities discontinued dishonest disney do dollar done dos downfall drag dragonball dreams drug store ds duckduckgo dug dumb dumbphone dust button easter egg eastside ebaulms edge eminem emu end engines enlightenment entertainment environment ethics ever exclusive expand expired site exporting eyes fail fall fallout fallout 4 famous fan art fear features fees feminist file fill fire firecore firefox firefox marketplace firefox os firewall firm firmware first five flaw flickr food football for forget forgotten domain fortress fox frame frame rate framework freddy's free money free to play freeware fried friend friendship fsf full fullscreen fun gambling game asset pack game list game maker game servers gameboy gamegear gameinformer gamemaker gamers gaming easter eggs gaming engine garrys mod gas gears geek gender glitch glove go good google contribute google play google+ gore gorescript gpu grand grandtheft auto gray greedy green grey grid groom gta guestbook gunners h2100 hack halflive handheld hard hardware harmony hawk headphones headset hedgehog hell hexen highschool highscore hl1 holidays home homicide hook hori gamepad hotel hotmail humble humor hyperkin hypermart illegal image images index color indie indiedb industries industry informer inn input input device insomnia instinct institute instructors intel intel vs amd intentional internet explorer internet radio interview introduction ion ip ip address irish iron island isometric iwork jack james jelly jif jiggly puff jiminquestion job joint joke jokes journalism joytokey js k70 key keystation killed killstreak kingdom hearts kryo lMP3 land lash law legacy collection legal length lerp liar lib GDX light lilly lithium live load local locked logic logmein lonely loop lost temple text adventure low end lowest market ludei lynx machine macomb community college macombacon makefile maker manifest mapping market market share marketing marriage married master mechanical media megaman melody meow microsd microusb midi mii miitomo mike mike v mind mini mini game minimum wage minish cap misleads moddb modding mode models mogotxt moltres monetize monitziation montization monzilla mouse murder musial mussels mystic n64 nba need nerd net netlink newgrounds nexon nfl nitch no notepad++ now nurse nwjs nyan o'reilly odk office offline oggenc2 oh operation out of order out of service out there overscan p2p p2w pad paid pandora panic papagayo paper weight parody party pause pay peer peerblock pewdie phones photo pi pi zero piano picture pin pink pixel art plagiarism plants plants vs zombies plastic platinum player playzool please plus pngcrush pngnqi pngout poke balls poker pokestops pool table popular populate portable posts power practice practive pre-order premade presentation preview price private processors promises promote provider ps1 ps3 ps4 public purple qlife qualcomm quest rack radio raffle ram rant rare rate razer recommend recording red cherry redit remove renaissance repair representation resources rest retirement retrode retron 5 retry rigging ripper river roads rolfe rom roms routing saga same score screen sharing screencastify scroogle scum seamless seed sega master system sequel servers service set setup seven card shapes share this shareware sharing shield shit shockwave shooter shop shot show your stuff off signs simple slavery sleep slip slumber smart smartboy smo snapdragon social media soda solitions sparks sparky spartan specialized spell check spelling spheres spoiler free spotify spyro stakes steam link sterling steve scott stop storm strategy game strategy guide stream streaming stud studio studios styles subscribe success super super mario maker bugs super mutants sync systems table tac tags tamagotchi target target marketing tax taxes teachers teaching team fortress 2 crafting teams tegra temple run temple run 2 testing textbase texture packer the king's league odyssey the world theft this thoughts thunder tic tile tilemap time time date tin titles toe tony top 5 topic matter torque touchpad toys trading travel traveling trees tube unearthing union unusual usb 3.0 usb y useless users vc view views villager vimeo vine vintage virtual reality virus volume voxel wall wallet wan wave wayback web assembly websitesubmit what is my ip white wired word wordpress workaround workshop xbox gamepad xeno xenoblade xhml xl xna you yourself zapdose zip zombie zombie panic zombie panic source

promotions