Host FREE website @ Home 2 - Apache2 & Port Forwarding

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
we are going to continue in our tutorial about installing a patch II server with PHP and MySQL in my last tutorial we did install Ubuntu we have opened a port in our firewall to be able to use the FTP option to be able to transfer files and give commands to our Linux version from windows even though we are not going to use the FTP in this tutorial I showed you guys how to use it in the last tutorial and the principles are the same for this window if you compare it with the SSH window this window this window is connected to this Ubuntu version so let us continue let's put this terminal here let me clear this screen so the first thing that we're going to do is install the Apache service so the way to install stuff on Linux is usually to write down sudo apt-get install and then you say what you want to install so we want to insert actually - now it's telling us here the following packages will be installed so in order for us to use apache - we need apparently all this stuff and we first yes enter the weight and now it's installing it for us okay so it's installed it would go to our Explorer we can go to our locations our computer and we will see here an ET see that apache - has been installed so this is an important folder let's put this folder apache - here as a bookmark just so we can go easily back to this folder here so now we have apache install that wasn't that hard right I don't know if it is running let us check so sweet oh okay I did it wrong I did it the old way so again I want to know the status but I need to ask it from ET see if I'm correct and then in it dove D and then Apache - ok so that was what we needed so we can see here that our fetch is running at the moment so let's go to our web browser to check it out if we go to our web browser and we type in a local host we can see that our local host is running you see if we will use 127.0.0.1 we will also get to our logo so this means local host our local host means this IP address and what are we seeing right here we are seeing a file in a folder and as you can see here it says it is located at ver www HTML index dot HTML let's search for that folder so we go to computer we go to art fair go to WWE and let's add this w w to our bookmarks here we are going to find a website here's the HTML file and if you would open this with an other application few other applications and let's use text editor the text editor we will see the HTML file here as you can see this is the default welcome page this is the default welcome page and if it will change this in hi with a couple of exclamation marks we say it's a read-only Fath here we have a first problem we cannot adjust it here we can only adjust it if we have the rights to adjust it if you are in in the Explorer window right click and press open in terminal and you automatically get to this folder so if you press LS for listing we would see our HTML file here okay so we see index.html we can use nano which is the standard text editor in the terminal window just you know index and press tab to autofill it you won't need your password and we can get into this editor in this editor we can go down and change something let's call this Apache you're going to serve the main page just so we can see that it is working and I wanted to say something here hi I am working and you press ctrl + X and then it asks you to save it and then you say yes I want to save it and now it is safe if we go back here and we refresh this page we will see it is the Apache main server hi I am working so now we know for sure that it is working but can we already use this from our windows so that's one of the main questions that you guys probably have so let's close this window and let's try and go to the website in our windows so we have to write down the IP address 192.168.1.1 dos computer cannot connect to your going to then outside world cannot connect to ubuntu as well so how do we fix this problem so we go back to your boon - and we know that it is working on the localhost but we know that the other computers cannot connect to this PC so we have to open a port for Apache and there is a way to open it we did this before so let's go to a pseudo ufw ubuntu firewall let's first start with the empty list this app lists well it is a autofill for an app so we want to use Apache so what we can do is see the UFW and then we're going to allow and then quotation mark and then let's actually fool waifu' full gives you the ability to use ssl connections which is port 443 something like that so now the rule is added so if we would UFW status we will see that apache foo is allowed and what does that mean that port 80 is open to connect and usually when some wants to connect it's already here you see so when I opened it it was able to connect from Windows so this is our window screen so that means that locally all the PCs can connect to port 80 of our Ubuntu and that does not mean that the outside world can connect to it yet in order for us to do that to have the outside world be able to connect to this server then we need to open the port and port forward to port from our router we have to find our router how do you do that you gotta go to your windows in this case so go to your windows in Windows go to start press CMD for the command window open the command window and type ipconfig you will get this screen you will see your own IP address of your windows so my windows this pc that is running the virtual machine is number two and we can find here the default gateway and that is our local router so let's go to this IP address in a browser 192.168.255.255 I don't know all the applications search for port forwarding that's the one in port forwarding you need to be able to forward port 80 to something if we would check Apache 2 you will see we have a TCP port of 80 open and 4 for free and it start and end and just make sure that it's only that port not 81 or 82 just 80 and 443 this is for the SSL connection and this is for the normal connection so if it is HTTP or this HTTP which is a SSL connection this needs to be open so make sure that you have 80 and 4 for free and make sure that you forward it to the right IP address so let's go back to port forwarding let's add this IP address 1 1 6 8 2.9 is it and let's add it and now the outside world can connect to nature I have a website which is called Fort Point project at the moment I have this fort can project calm sent to my IP address my router tells us that whenever something comes in on port 80 which is HTTP it will send it to the IP address of your boot how do you get this to work you need to have a location where you have your DNS as they call it I have the trans IP which is for me a Dutch website as I'm from the Netherlands domain hosting as you can see here I have the domain fort from project comm this is probably the same for every domain name web site you have to put your IP address a type a for at whatever is here for the project you will get to this IP address and this is my local IP address so if I would search of my IP able to tell me so here is my IP this is my local IP and from the meadowlands it might be here and as you can see I send it to my IP so if I would go to my IP now here it will be sent here so you guys get it you buy a domain name the domain name is registered to a IP address that is how you connect it so we have a patchy server running so I hope you guys did learn something new today I hope you guys now understand how you can connect the outside world to your Apache 2 server to your virtual machine I hope you now understand that you have to open the ports first before you are able to do this we are going to continue in this in this tutorial in the next video if you did enjoy it give it a big like and if you are new to my channel it would be so awesome if you would subscribe to my channel because I make these kinds of videos every once in a while and in the next episode we are going to continue making our PHP and MySQL server so thank you guys for being here and see you guys next time let us open this file sudo nano now let me check for the last time we have a server name and the server name will be apartment project Elias would be everything dot Fortran project where the server admin is not important we can delete this we don't need it the document root is correct am i right yeah okay so now we have a good for current configuration file so I save it yes enter
Info
Channel: Bitcoin Daytrader
Views: 23,626
Rating: 4.9146142 out of 5
Keywords: Bitcoin, Daytrader, Blockchain, Cryptocurrency, Apache2, php5, mySQL, tutorial, webdesign, Linux, phpmyadmin, ftp, port forwarding, port 80, openssh-server, ssl, Ubuntu, localhost, internet, connection, how to, website, hosting, 443, http, https, difference
Id: KvLj-TNXFDs
Channel Id: undefined
Length: 10min 15sec (615 seconds)
Published: Sat Feb 01 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.