02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Fixing a warning we are getting

Fixing a warning we are getting when we restart the httpd server.

Video Transcript

00:00All right, so before we finish up,
00:02before we take that break and wait for the server
00:04to reconfigure itself, I want to also solve this.
00:08If you see this error, let's solve it.
00:10It basically tells us that it could not reliably
00:13determine the server's fully qualified domain name
00:16using first server name.
00:18So what I want to do is I'm going to go inside of that
00:21again into my config file.
00:23And in my config file, I want to actually add my IP address
00:27as one of the qualified domains.
00:29So if we scroll a little bit in our menu,
00:33this time around, I have to search for it a bit.
00:35We'll find that definition that it's commented out.
00:38And what we're going to want to do
00:39is we're going to want to enable it, but put our actual IP in.
00:45Now, by the way, if I'm already going through this,
00:47we haven't changed or played with any of the configurations.
00:50And for example, this list in 80
00:53is the default port for HTTP.
00:56In the future, when you put in HTTPS or other services,
00:59you might want to go inside
01:01and listen to other services as well.
01:03But when we get to those type of more advanced topics,
01:05we'll look into them.
01:07But by default, the default configuration
01:09should already have less than 80.
01:11If it doesn't, then you definitely need to have it,
01:14but the default should have it
01:15so you shouldn't have anything to worry about.
01:17It basically opens up that gateway,
01:19enabling people to come onto your website
01:21because your website is expected to be on port 80
01:25because it's HTML, it's HTTP, and not HTTPS.
01:30Okay, so let's continue, and we're going to search here.
01:32I want to find that line where there is that definition
01:37of what our hosting is.
01:39Right now, I'm sure it's commented out
01:41or it has an IP address that isn't accurate.
01:44So we want to find it.
01:46So here we go, so server name.
01:49So one is if, and I'm just going to read out this copy
01:52so it makes it very, very clear,
01:54although you could do it yourself.
01:56The server name gives the name and the port
02:00that the server uses to identify itself.
02:03This can often be determined automatically,
02:06but we recommend that you specify it specifically
02:09to prevent problems during startup.
02:11If this is not set up to a valid DNS name for your host,
02:16server-generated redirections will not work.
02:19See also, blah, blah, blah.
02:22So basically, all it really is,
02:24is you want to add your actual IP address here
02:27for your server name.
02:29So I'm going to go inside of my server name.
02:31So let me just, the IP address is totally fine.
02:35We don't have to put the actual server case.
02:37In our case, we're going to have a few servers.
02:39So I'm just going to move into insert mode,
02:41and I'm going to comment down the server name.
02:44Or you know what, let me leave that uncommented
02:46and I'll just add a new one.
02:48And I'll just type here, just break a line here.
02:52And I'm going to type here, server name.
02:55And I'm going to paste inside my IP address.
02:57Oopsie, I don't have that IP address.
02:59So let me pause for a second, grab the IP address,
03:03and then we will be back.
03:05Oh, you know what, maybe I have it here in my browser.
03:08Yep, I do.
03:09So let me just grab that.
03:17So we're going to paste that server name.
03:19We just want the IP address.
03:21We don't want anything else beyond that.
03:26And that's it.
03:27That's what we needed to put there to configure it.
03:29So I'm just going to press escape
03:31and I'm going to save it by typing Shift ZZ.
03:34And I'm going to press on to restart my server again
03:36to see if it changed and it helped us.
03:38You know, let me just clear the screen again,
03:40just so it's easier to view.
03:42And I'm going to click here on restart
03:44and you can see now it's stopping, it's starting,
03:46it's not giving us that error anymore.
03:48And that's it.
03:49So let's say you get rid of that error.
03:50Although you could ignore that error
03:52because it's only a warning,
03:53because we're not really using our IP as our main server,
03:57but you could always put there also a default host
04:00or a default URL that you want there to be
04:03if someone goes on to a place that you didn't expect,
04:05for example.
04:06So if it doesn't fall into one of those configurations
04:10that you want.
04:11But I think the IP address is the best solution.
04:14Although we're not expecting people to access our site
04:17from the IP address,
04:18they'll usually fall onto a dead page anyways
04:21when they hit it,
04:22because it's not configured in any of our virtual hosts.
04:26All right, so we'll be back soon once the site is live.

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!