2018-03-09 Tech Talks: How to Host a Website
Mitchell talks about how to host a website by spinning up a Virtual Private Server and installing the proper programs while Sam talks about how to create the proper DNS records to point a domain TLD to the right place.
icon search Searchable Transcript
Toggle between list and paragraph view.
[00:00:08.256]Hi, welcome to (OS)2G, once again. Uh,
[00:00:10.286]in case you didn't know, my name is Mitch
[00:00:12.154]um, and today what we're going to be talking about
[00:00:14.595]is how to actually get hosting for a website.
[00:00:16.643]Uh, show of hands,
[00:00:17.533]how many people here bothered to create their own website at some point?
[00:00:21.428]Pretty good showing, uh
[00:00:22.468]but there are a lot of people who probably are interested
[00:00:24.638]in trying to do that kind of stuff, and haven't
[00:00:26.732]or, don't really don't know what they're doing or how to do it.
[00:00:29.673]So, uh, in the long run
[00:00:31.163]we'll also be covering how to actually build a website
[00:00:33.123]and that's gonna be in about two weeks
[00:00:34.803]but for today I want to at least show you guys
[00:00:36.923]how to do the hosting portion.
[00:00:39.741]So, caveat before I begin,
[00:00:42.753]you do not have to do this
[00:00:43.893]the way that I do this.
[00:00:45.289]I am doing this because it is
[00:00:46.946]pretty straight forward, cheap,
[00:00:48.476]and Digital Ocean has really good documentation.
[00:00:51.337]So, we all know that in order to have a website
[00:00:54.007]you have to have a server for that website, right?
[00:00:56.751]Yes, ok. Cool. Sweet. So,
[00:00:58.381]We are using Digital Ocean because,
[00:01:00.451]everybody and their mother uses it
[00:01:01.921]and it's $5 to have a server that's enough.
[00:01:04.011]So, um, if we, by the way,
[00:01:07.741]in case you guys forget all the stuff,
[00:01:09.791]or you just don't feel like tuning in,
[00:01:11.181]there is a lovely little guide on our wiki,
[00:01:13.111]it's not very extensive. Uh, it really doesn't
[00:01:15.081]get into all the fun stuff, so, uh,
[00:01:17.271]down here at the bottom you'll see
[00:01:18.531]that there's, uh, a pretty useful follow up,
[00:01:20.631]uh, I think it's this one right here,
[00:01:22.681]that explains why you want to install the full
[00:01:24.711]LAMP server stack, um,
[00:01:27.996]but, just for today, we're covering
[00:01:29.686]the bare essentials necessary for
[00:01:31.066]you to have a running web server
[00:01:32.866]with your stuff on it.
[00:01:35.192]So firsts things first, uh, you gotta
[00:01:36.862]acquire a domain, and like it says right here,
[00:01:38.692]that's Sam's party, not my business.
[00:01:40.462]Um, but, getting the server itself is kind of
[00:01:43.312]a key element, so you can write a lot
[00:01:44.802]of the software on your own local machine
[00:01:46.282]if you feel like it. But, that's not smart.
[00:01:48.692]Cuz then you leave all those ports available
[00:01:50.614]and open to anybody that's interested in
[00:01:52.784]sending you, uh, fun thing's in the mail, and we
[00:01:55.484]don't want that. So, we go over here
[00:01:58.274]to Digital Ocean, and if we take a look at this,
[00:02:00.884]you can see that I have purchased the $5/mo
[00:02:03.944]droplet that's really not all that impressive,
[00:02:05.964]and I just rebuilt it and I'll do it again
[00:02:07.904]just for the sake of it. Um, this droplet
[00:02:10.324]using uh, Debian 9.3. The reason
[00:02:12.374]I decided to use Debain it cuz, setting
[00:02:14.964]up a web server on Debian is, easy.
[00:02:18.513]It, it's about as easy as it gets, so this is
[00:02:20.483]literally like 5 commands all said and done.
[00:02:22.561]I just wan't to walk you guys through this,
[00:02:23.733]so that we have it recorded and people can
[00:02:25.143]see it in the future if they want to do this
[00:02:26.853]themselves. Um, so once we have this,
[00:02:30.853]right, once it's done rebuilding, I have to
[00:02:33.433]actually access it and there's our IPv4 address,
[00:02:36.573]so I go and I pull up PuTTY here and I go, uh,
[00:02:48.553]and it says,
[00:02:50.663]"Who am I?" and I say, "I don't care,"
[00:02:52.737]and I will log in as root...
[00:02:54.077]Ok, so once we're here, right?
[00:02:55.777]That's great, but, now I clearly have
[00:02:58.647]nothing, so I have to fix that.
[00:03:01.638]And if we follow along with the little
[00:03:03.028]guide, right? So, we created a droplet,
[00:03:06.930]and once we created the droplet and we got
[00:03:09.150]SSH access, by the way, if you wanted to do
[00:03:11.150]SSH keys, or user accounts, now would be
[00:03:13.110]the time. The reason why you would want
[00:03:14.470]to do that, you don't want to always
[00:03:15.540]want to be logging in as root, that is bad
[00:03:17.050]security practice. So, we can walk through
[00:03:19.450]how to make a user, and all that "jazz"
[00:03:20.910]at a later point in time, but for now,
[00:03:23.130]you should know that. So, now,
[00:03:26.095]now that we have this, we have to actually
[00:03:28.155]uh, put the right stuff on it, so, let me
[00:03:32.835]move this out of the way so that I can
[00:03:34.435]make sure that everything that's on
[00:03:35.865]this guide is correct, cuz I checked
[00:03:37.105]everything but I don't like when I'm a lier.
[00:03:41.305]Yup, cool. So, normally you have
[00:03:43.995]to put "sudo" here, but because I, I am
[00:03:46.855]'root,' I don't need to worry about that,
[00:03:48.585]So it updates, that's great, once we
[00:03:51.735]update the server, um, then we have
[00:03:53.695]to actually apply the updates,
[00:03:54.785]then we install Apache, and we're done.
[00:03:57.616]It is really that easy. Now that said,
[00:04:00.266]the actual configuring of the website
[00:04:02.026]is where all the magic happens, we'll get
[00:04:03.356]to that in two weeks, but this is all
[00:04:04.596]it takes to have your own website
[00:04:06.456]actually do stuff. Uh, so, once we have that,
[00:04:09.216]we do, "apt-get upgrade" the system.
[00:04:16.420]Oh, I should've put "yes," whatever.
[00:04:19.952]Doo-de-lit-do, and then,
[00:04:21.482]"apt install apache2"
[00:04:25.798]Sam: Make sure to install PHP also.
[00:04:29.074]Oh, you should do that, that's why I linked
[00:04:32.164]to the LAMP server, but I just wanted to
[00:04:33.604]keep this as short and sweet as possible.
[00:04:35.824]Cuz you do need PHP if you want to do
[00:04:37.424]anything, it wont work without PHP,
[00:04:40.214]but now, at minimum, if I go here
[00:04:44.064]to the domain that
[00:04:44.944]I already have my stuff parked at,
[00:04:46.977]congratulations, you now have a
[00:04:49.057]web server running, and if you say you
[00:04:50.417]want to hack it, you can do that, uh
[00:04:52.846]you can port scan it, I honestly was thinking
[00:04:55.386]about turning this into a "zen map guide"
[00:04:57.496]but that's ok. Um, anyways, yeah, so that's
[00:05:01.026]literally it, making a website isn't as
[00:05:02.856]complicated as you'd thing it is, I mean,
[00:05:04.566]this is only the front half of the battle,
[00:05:06.416]now you gotta make your site, but
[00:05:07.796]that's how easy it is to do all the hosting,
[00:05:09.976]and get all that done, and make sure
[00:05:11.356]that it works, so.
[00:05:12.716]Sam: Alright, so once you have a
[00:05:15.186]connection, or once you have a
[00:05:16.896]web server set up, you wan't to have
[00:05:19.076]it on a nice, pretty, uh, name, right?
[00:05:23.007]You don't want to tell people,
[00:05:23.987]"Oh, yeah, my website's 192.168.whatever.whatever"
[00:05:28.172]so instead, you're gonna use a domain name.
[00:05:30.752]Audience member: "127.0.0.1"
[00:05:34.157]Sam: So, uh, sorry it's gonna take me moment
[00:05:36.507]to get hooked up, once you have a
[00:05:39.167]domain name purchased, I'm not gonna
[00:05:40.417]walk through that because that's
[00:05:42.157]pretty simple, uh, the big thing is just
[00:05:43.907]finding one can be a bit hard, uh, and
[00:05:47.057]there are, uh, people who hoard domains,
[00:05:49.617]Mitchell: Do you wan't me to just give you
[00:05:50.487]the IP address for the server?
[00:05:51.537]Sam: Yes I'm gonna have you do that
[00:05:52.397]in a seccond.
[00:05:52.927]Mitchell: That works.
[00:05:53.457]Sam: So once you do that, you'll purchase
[00:05:54.997]your domain, and I need to find, uh,
[00:06:00.334]find the once I purchased, uh, I have way
[00:06:03.444]too many, um, so, go into that, and,
[00:06:10.438]hey look, I want it to go some place,
[00:06:16.434]ok cool. So you have options like,
[00:06:19.584]"redirect domain" those will let it
[00:06:21.354]redirect to some place else, uh,
[00:06:23.974]but what you need to do, is you need
[00:06:26.124]to set up a DNS entry. If you're just using
[00:06:29.574]plain NameCheap or whatever, they should
[00:06:32.244]have a pretty easy way of doing that,
[00:06:34.496]all you have to do, is add a new record
[00:06:39.998]of type, "A," "A" is a standard IP address
[00:06:45.298]record. It's, we're putting it at "@," "@"
[00:06:50.218]is just the domain itself and then, give
[00:06:52.688]it an IP address.
[00:06:54.148]Hey Mitch, what's the IP address?
[00:07:07.011]Sam: 193, alrighty, so,
[00:07:10.491]Audience member: You're going to redirect
[00:07:11.311]the entire OS2G to it?
[00:07:12.887]Sam: No, this is os2g.org no os2g.club.
[00:07:20.275]Get rid of the old, uh, records, and now
[00:07:31.185]if we try
[00:07:36.331]os2g.org, well it's gonna take
[00:07:38.491]a little while. So you guys know,
[00:07:40.311]when you enter stuff into DNS it
[00:07:42.231]can take up to 24 hours for it to
[00:07:43.811]propagate across the entirety of the world,
[00:07:46.246]uh, so, esentially, as of right now os2g.org
[00:07:51.156]has a value, it just takes a little while.
[00:07:55.790]So, that's pretty much it as DNS goes,
[00:07:59.790]or basic DNS. Alrighty, thank you.
Log in to post comments