Host Your Own Website For FREE! How To Build A Webserver From Scratch! [ Using An Old PC ]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
now this is the official first video of the channel that I've been trying to start for how many months now it's a long long long time so I started trying to make an intro video and then I had this idea which I'm gonna put on screen that crazy thing that took a really really long time to make and then I still couldn't make a video of it so I decided just cuz it was something I was working on right now I was just gonna make the first video about how to set up a basic apache2 web server using like an old PC that you have laying around figured to be a great tutorial video just a good intro like what this channel is gonna be about and just as a quick overview because I mean I'm like skipping the intro video burgers were you know they were just see how this goes you know but I'm gonna try to get around like tech projects like programming building apps software development web development hardware stuff and then also do things that involve like arts and music and stuff like that I want y'all to give me the suggestions below in the comments I'm not gonna be one of those kind of youtubers that talks for a million years in beginning the video because what is it now it's already like too long because I seriously doubt y'all y'all really care about me talking about my cat for like 15 minutes not gonna be that guy so uh let's jump right into it so this is inspired in 570 that we're gonna be using to just kind of clean up and turn it into a functional web server which by the end of this project we'll be able to have a demo website and access that website from any internet connection on any kind of device anywhere wherever that you have an internet connection you'll be able to connect to this desktop right here and display the webpage that you've put into it but first this thing is pretty dirty inside so I'm gonna have to take apart every single part in this and clean it out most of it's gonna be time lapse so but we'll just jump right into it [Music] so now we need to install an operating system and for that we're gonna be using Kali Linux don't give me crap for using Kali it's just Kali just gotta love it you know all right so to make a boot disk it's actually really simple you're some go to Kali dot org slash downloads and choose the ISO image right here that is right for you and I like using a tool called Rufus makes it very simple to make boot disk you can download it for free and you might want to consider that theoretically your server would always be running therefore if you're using like HDD type drives there's a lot higher chance that they could fail so what you want to do is check to see if your computer is raid compatible and that basically means that it's able to use two drives at the same time to keep a redundant backup so if one of the drives fail the other drive will copy all of the data over so first I'm gonna show you how to set up a raid system and then we're gonna ahead and continue with the install because it'll be exactly the same for both cases so we're gonna select number one create a rape volume and then we have two options here rate zero striping which is splitting the data of amongst two disks which we don't want to do that we're gonna press up and we change that to rake one which is mirroring this gonna mirror two disks this is going to create a 465 gigabyte capacity now keep in mind we have a 700 YouTube I'd drive in there alongside a 500 gigabyte Drive now the reason that we don't have a larger Drive than 500 gigabytes is obviously you can't mirror two drives that are smaller than one of them that's all you really have to do now it's set up and now you can go set up the operating system on that virtual disk that's going to be built over it into smaller ones I always run into problems at the graphical smell so I just go to install I'm gonna fast-forward through all the basic stuff is alrighty so partitioning the disk this is really important first thing you're gonna do I always just use the entire disk I'm gonna just do all in one one partition so what we're gonna do is we're gonna increase swap which is basically like space on the hard drive that the the operating system can use this like emergency Ram basically so the more of that we have the better go ahead and delete the partition on both of these position and then hit this free space not in there ninety gigabytes I just primary begin so now we have 10.2 gigabytes of free space that we can use to create a logical swap area so now once we have that should be ready to go and go ahead and write those changes the disk install finished everything is good and we booted into our new distro there's a problem with Kali when it's first installed that when you run apt update like such you see there it doesn't do anything just because apps sources list file under et Cie apt is blank you have to go on the Kali website and put the source for all of your apt packages in this file for it to work and now let's go ahead and just do app to update [Music] so once you're done updating let's go ahead and install Apache apt install apache2 and it should already be installed now let's go ahead and also add a package called ufw which is our uncomplicated firewall okay so let's get this mess out of the way and we're gonna go ahead and configure the firewall clear and let's do ufw app list that's gonna show us a list of applications available for the firewall let's go ahead and do ufw allow WW and then we'll also do www fold so now let's go ahead and add just a sample webpage to our website alright so in this folder we can see if there's a default index dot HTML let's go ahead and remove that ok so now let's go ahead and make a new file titled index.html and let's go ahead and just build like a really simple web page into this now let's go ahead and test Apache to make sure we can connect to our website to do service Apache to start post name - capital I copy that and we're going to paste that into a new search engine and there we are now we've pulled up our web page now this is being hosted locally on the web server so you can only access it from within this network so now I'm going to show you just a few configuration changes that you're probably going to want to make and there are three files that we need to edit so let's go ahead and open first one so this is the local port that your service and be listening to by default it's set to 80 but I have another server on 80 so I'm going to set it to 79 just for demonstration purposes alright so then let's go ahead and edit e to see Apache - Apache - config scroll about three-quarters of the way down here and then we're gonna set this allow override too far and the last thing we need to do is make sure that the PHP memory limit doesn't exhaust itself on large uploads so the first thing we're going to look for is memory image so we're finding this and it's such a like two megabytes which i think is super low so I'm gonna set that to just something that's not to make bytes and then we're gonna find upload mac size set that to two thousand megabytes do post maxes all right go ahead and save and close and now we are done so we can do service apache2 we start the problem though so now when we when we refresh this we actually can't connect to it from the local IP address because we changed the local port from 80 to 79 so we have to go and set up port forwarding so that we can access this from the external IP address so we need to login to our router which is usually 191 6 801 so if your router doesn't give you the options for example under firewall it actually doesn't show virtual servers in port forwarding I have to actually go in edit the site variables for it to show me that so Firefox just go to storage here and then under session storage we're gonna just select the site and these two values your disable and hide I'm gonna set those to just a semicolon and then now go ahead and close out of that and refresh and there you are now you more options in receive virtual servers and port forwarding so now we can go ahead and add a new virtual server I'm just gonna call it YouTube server this is the port on the external side that we're gonna be dialing up so my router actually has port 80 disabled by default so I'm gonna do 8080 and then the private IP address that's the local IP address of your server 168 0 20 and then the local port is the one that we set up in port stock to fit which is 79 so we're going to be forwarding for at 79 to the external port 8080 and go ahead and click add virtual server alright cool so we're done here now so we can go ahead and close out of that so now we need to go find out what your public IP addresses so just go and you know search my IP and I'll give you the IP address of your router to copy that and then we can use that to construct URL for our server colon for port and that is going to connect to port 8080 of our router and boom there is our website and this IP right here is a public IP so you can access that from anywhere and to prove that I'm gonna go show you my phone and the turn off Wi-Fi put it on mobile data and we're going to try to connect to the site so this right here works just like any other website would but obviously it doesn't look super nice so if you want to customize this like URL here without buying a domain you can go to fit recom and then you can press create here and then go ahead and you can type your own URL here so we'll do a YouTube server and then you can go to fixed ly / into server and boom there we go it pulls up your web page and there we have it there's a functional web server out of the old PC so I really really enjoyed making this tutorial I hope you all learn something from it and hopefully y'all try for yourself too because you can really do a lot with this platform and I'm gonna dive deeper into actually building a website next time so thanks for watching like and subscribe for more and I will see you all next time [Music]
Info
Channel: Dyverge
Views: 88,698
Rating: 4.8205657 out of 5
Keywords: Webserver, Linux, Web hosting, Kali Linux, Kali
Id: wFjYzhkEBys
Channel Id: undefined
Length: 11min 49sec (709 seconds)
Published: Mon Apr 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.