DIY Webhosting-Webmin-Virtualmin on virtual Ubuntu Server-EP112

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] how do you to bunky Joe here Uncle Joe's Playhouse today have you ever have you ever one to host your own website I know I know are you're crazy now is your own website why is that why am I crazy to host my own website you know I feel about the cloud I don't trust it I don't trust companies with my data I don't trust companies not to sell my data not that I have anything to sell and not that I have anything to hide I just don't want them having it I want to control my own destiny just like I have my own network I don't trust my network to the cloud I don't trust my data to it companies come and go they come in and out of business they get hacked plus I like to tinker and play around with with my websites and that's how I learn so if you're so inclined that's what this video is all about today it's how to set up your own web hosting server and you can't it's not for just one domain I have multiple domains that I own or I have the rights to and I want them all on the same server I don't want to have to go out and rent a server it albeit you can rent servers pretty cheap these days you know probably about ten bucks a month you can get a server for even lower than that but I like controlling my own destiny and I like controlling the backend and seeing how all that works so what we're gonna do today is I'm going to show you how to set up in a boon to server how to install webmin virtual men and how to set a basic web hosting out basic web host server and how I did it now this is not a soup to nuts installation you need to have some basic knowledge about DNS you need to know how to go out to hover or or whoever on what other name registrar you use I'll high prefer however that's just my personal preference and registered domain naming you need to know how to point DNS records to the right IP address you also need to have a public IP address in order to be able to come in if you don't have the public IP address you're gonna need to know about dynamic DNS so this is just to show you again my videos are not tutorial videos they're just to show you what the potential is that I can have that I can use with the equipment that I have what I can make happen so this is going to be as a virtual machine on my dell 2016 domain controller running Windows Server 2016 so let's quit talking and get started with the install alright so the first thing we need to do is create a virtual machine that is gonna host our go to web man virtual means server and I'm not gonna run through the install process of a boat too it's pretty self-explanatory I'll pick up some key parts of the install that you need to see and be aware of others should hopefully help you follow along the first thing we want to do is create a virtual machine so I'm in hyper-v which is what I use I'm on my 2016 domain controller 0 1 and you can see I've got a bevy of a plethora of other virtual machines are up and running I've already actually created my web server and will come back and use that later but I want to do one from scratch to show you so the first thing we want to do is to a new virtual machine and I'm just going to call this web 2 it's going to be a generation 1 I'm only going to give mine to gig of ram you can they give it more if you want to I need to tell it what subnet I want what land connection I'm using and I'm just gonna let it create a 127 gig virtually expanding our drive and I'll install the OS later and then finish and that's how easy it is to create a virtual machine no I'm just kidding now we need to change some settings we need to tell this virtual machine what to boot off of and we want to boot off the boot to install CD or ISO image that we've downloaded so I'm going to go to settings and I have put the ISO file out on the local hard drive of this server so if I browse to my drive pool and go to my ISO folder here's my ebook tube 16.04 - or a point - server amd64 so I'm going to attach that to the IDE controller apply it until it ok so now what I'm going to do is double click and then I'm gonna power on this virtual machine okay we select English as our language we're going to install in a mood to server we speak English United States I'm not gonna happen detect the keyboard I'm just gonna tell it's an English us keyboard now one of the things I but I don't care for on the Ubuntu install while we're waiting is the fact that I don't have an option here to set up my networking it it automatically does sense enough to use DHCP but that's ok if you were to use sent OS and you can use sent OS with webmin and virtualmin that's another video in itself but sent to us allows you to go in and edit your network config while you do be installed so as you can see here it's Auto configuring getting an IP address from my DHCP server all right now I'm gonna call this of a hostname web to continue and I'm going to set up my user you have a big Battlestar Gallactica fan so that's why you use bill Adama [Music] no I'm not gonna encrypt my home directory alright now a boon - yes a butch is gonna go through several steps here we're going to tell it to create a LVM partition guided using LVM that's logical volume management so I was going to tell it yes I'm going pretty quick through here but you can rewind the video pause that if you need to to get the settings that I got now this part of the installs could have run and then after that's done it'll ask us what features we want to install so I'm gonna pause the video here while it's installing and we will come back with that when that screen comes up alright so now we've come to the package manager and now what it's doing is it's asking you if you need to use a proxy server in order to get onto the internet we don't so I'm just gonna tab down to continue leave that blank so apt apt the program that goes out and gets other software is retrieving some basic files and setting up our repository and should hopefully come up here fairly soon now what we're doing is a base install and I'm gonna tell it no don't do automatic updates because when we run the script for the web mint virtual mini install it's gonna change all that anyway so the only software you want to load is two items your standard system utilities and OpenSSH server the reason you want to open run or install OpenSSH server so we can get in via a terminal program later to do the necessary installs for web man and virtual mints so make sure you've selected standard system utilities and OpenSSH it continue and left the and I will come back when this is complete all right so now that part of the insole is completed so now it's asking us if we want to install grub which is the boot loader to the Master Boot Record and yes we do [Music] this is one of the beauties of having a a virtual network and a lab setting to where you can create these kind of virtual machines and experiment with them and learn and trust me the more stuff you fill into your head more data you put into your head the better it's going to do you in the long run okay so the installation is complete it's time to glue your new system make sure to remove the insulation media I don't ever do that Windows hyper-v just seems to handle that itself so I'm going to tell it continue and hopefully it will reboot here [Music] [Music] now it's my understanding that a boon to has the hyper-v integration built into it so I've just logged in as Adama and the pen with the password that I created and now I'm going to type ifconfig what that's going to tell me is my IP address and you need to write this down we're gonna be changing that later but right now it's hard coded or it's I've gotten a DHCP enters of 5.50 so we'll write that down for future reference so now we can actually we're done with this part of this for now so I'm going to get that out of my way and then we're gonna load putty putty is a terminal program it's also a telnet program it's quite a bit of program it's built into one and of course it's on the desktop that I am not using right now so let me load putty bring it over here so you can see it and I'm going to go ahead and just manually type in the IP address but that was 5.50 now the first time I try to login with putty it's going to give me the security alert about the certificate you want to tell it yes now the next time you login with putty it won't prompt you for that so I'm logged in as Adama all right there we go and it's even telling you run a command as administrator user root use sudo command me and Cinnabon too has changed how they use the they don't give the loop user or the root access without sudo akin to root if that makes sense alright so now we need to continue on with the next step which is getting virtualmin and webmin installed so i'm over at the virtualmin documentation page and it we've done step one which is install your grade a supported operating system they also want you to be sure to configure the system for the fully qualified domain name it says it'll save you a lot of time and documentation and I'll try to explain that later best as I can so what you want to do is run these scripts that are here the devil you get script and then we're gonna run the install script everyone left us running this is going to take quite a bit of time so the first thing I want to do is I'm going to highlight this string right click and choose copy then we go back to putty and I'm going to paste that and hit the enter key and what that's going to do is it's going in it's going to download the install script for virtual mint and the next thing I need to do is to run that script that shell scripts so I do just come in here so I right click copy back into putty and paste that and now it's gonna prompt me for my password for Adama so I'll enter that in now it's warning you this was a little disconcerting to me it tells you it's supported on scent OS six and seven Debian 7 8 9 and booted to 1404 LTS 1604 LTS on i386 and AMD 64 now that was a little misleading because i'm running ubuntu 16.04 point 2 which is not miss mention up there but any of the versions of 16 point oh four should work and it's going to tell you it you know if your if your operating system version architecture is not listed installation will fail so I'm gonna hit the Y key now and hit enter and I'm just gonna enter a fully qualified domain name as web 2.0 snot local this really doesn't matter because I have a mattad system here so this will come though so rear its ugly head later and I'll show you because there's a couple waiting a couple of ways to handle web hosting DNS and I picked the easiest way so I'm just gonna put webtoon MCS not local and what its gonna do now is it's gonna go out and it's going to do the install of webmin and virtual mint and hopefully if I've done everything right and we come back we'll come back a little bit and all that will be taken care of and we should be able to get in and start configuring our server while this is running just so it's not only installing webmin and virtual men but it's installing the complete lamp stack lamp means Linux Apache my sequel and PHP and also it installs postfix and njr of whatever else it means to run as a as a web hosting server so that's why we didn't install lamp when we did the initial in the sole of the boot - we could have but it's kind of redundant because it's going to download the lamp stack and install it and I prefer to have the one that virtualmin and webmin recommend to keep us from having trouble down the road so I just wanted to inject that while this is still installing it does install it does indeed install the lamp stack as you can see right there and it installs what specifically made for virtualmin so here we go it looks like we were successful that says if there were no errors above virtual min should be ready to configure and it gives us the web address to go to so I'm gonna scroll up here and it looks like there were no errors so I think we're good to go so what we want to do now is bring up a browser and go into the configuration so what we want to do is we have to be a secure site so we do HTTP colon forward slash forward slash from the IP address and then a port number 10,000 now it's gonna warn us the security certificate is not valid that's okay we're gonna go ahead and proceed and here we use that a dhama sorry now I'm a username and password now the first time in escape for men is going to want to run its little configuration routine and we're not going to do that okay will allow show notification I'm just gonna cancel on this installation wizard we can come back and run that again the first thing I want to do is get my IP address setting in here correctly I want a hard coded so I'm just going to use the IP address that they gave us but I'm just gonna take it for me hard-coded actually the IP address I'm going to use I believe is 11 because it's I want to use a static IP so well I cancelled on the virtual min configuration I'm going to come back over here to web in then we're gonna go to networking and down to network configuration the reason I like this web min configuration because it gives you a GUI to do all of this if you go out if you if you enjoy going out and editing these configuration files manually more power to you I'm a GUI guy I like to use a GUI so we go to our network interfaces and this is where we're gonna we're gonna select 0 eth0 and we're going to tell it a static configuration you can enter our IP address here in our net mask and we're going to save that [Music] and return to network configuration because we need to go out and change our router so our router should be a gateway and that should be 192.168.1.254 and we need to save that [Music] okay hostname in DNS client this should all be set up in here already web 2.0 chol it's already seen my DNS servers this is my local DNS for Active Directory and using my external DNS servers Google of course and then host addresses now this is what you're going to need to come back in and change after we do a reboot so we're gonna change the IP address and we're going to reboot and then we're going to come back and we're going to change this to reflect the new IP address that's important to get virtualmin to work correctly so for now what I'm going to do is I'm going to apply the configuration then what's going to happen is I'm going to sign out I'm gonna come back here to putty and I'm gonna do a pseudo shutdown - are now so what I've done is I've told it to shut down and reboot the machine and I need to enter my password and then I will lose my connection to putty however if we come back here to our domain controller we can watch the virtual machine go through its little reboot mode okay still booting all right so let's go ahead and login at this prompt and see if it's made our changes so I do I have to config at the prompt and now you can see where indeed we're need at 5.11 so I'm going to log out here now I'm going to go ahead and just get out of this screen here go back to my desktop and i'm gonna close putty now i should not need putty anymore so what i want to do is come back in and let's go back out to the new IP address that we created [Music] ah webmin is a wonderful program I've been using it ever since I have been using Linux because I do not because you know I am NOT a fan of the fan line then I named me Pete Pete and repeat alright so hopefully webmin will come up here fairly quickly okay and here we're getting a couple of warning messages here updated and correct refresh we'll come to that here in a minute the first thing I want to do is go back out here to networking I'm sorry I'm under version that I need to go back to webmin under networking and go to network configuration and remember this host address is I want to go out here and see if it's changed it if not I want to change it manually and it hasn't so I'm just going to click on it and I'm going to change that to five [Music] let's see you know and this is a glitch is a bug in Google Chrome see what's happening every time I type a number it comes up over here and thinks I'm typing something in there so I'm going to use I'm gonna use Mozilla for this just to get us through this so pardon me while I bring up Mozilla I don't know what it is with Chrome to that but it just it doesn't want to work right so bear with me so HTTP colon forward slash forward slash one I to once they say I've got 11 for 10,000 yeah advanced we're gonna add an exception alright so we'll try this again and it doesn't do it Chrome doesn't do that every time with webmin so I don't know what the issue is but I suppose the folks over at web mini virtualmin have reported it to to Google ok so again we're going to go back to networking we're going to go to network configuration I'm gonna go to host addresses and you see it's got our old house address so we want to correct that so click on it and we should be able to change it to 5.11 save it returned and that we should be able to apply it [Music] and then come down here to system information this will bring you to that load screen etc and now you can see our system hostname is correct webtoon mcs not local and 5.11 now the next thing I want to do is I want to get all the updates done and as you can see there are a hundred and twenty eight package updates are available so the beauty of the the reason I did it select security updates when I mooned who installed it because I knew webmin would handle all the updates for me there are web mint updates which is basically it'll go out and it'll look out look for all the Linux updates that are out there for a boat - so I've just clicked on that these are all the updates that are out there and some are security some are just regular updates and Intel's over here decide what they are I always go ahead and do all the updates on all the packages and then it'll probably reboot so I'm going to come all the way down here the bottom I'm going to update selected packages because they're all selected and it's gonna build a list and it's gonna ask me here's the list of all the packets it's going to install our packages and I'm gonna tell it installed out of this is going to take a bit of time you may have more updates you may have less updates it just depends on what version you would install how old it is etc so I'm gonna let this run and we'll come back when the screen asks us to do something different after these updates are done the computer's going to want to reboot and there may still be updates out there and then once it's done that we can get on to the configuration of virtual meant so the updates have completed it wants us to reboot so I'm going to go ahead and reboot the server we will come back when that is complete so it looks like it's gotten through it says all packages are up to date now now we've got some warnings here and we've got recheck and refresh configuration now what I'm going to do is show you how I got it to work for me your mileage might vary the problem is is that I haven't installed this on a local internal IP so the first thing I need to do in order to get this to work is open supports specifically I'm going to open port 80 and port 443 for now and I'm going to forward them to this 5.11 address now you also need to have a to know what your public IP address is if you I purchased a public IP from my internet service provider so they give me one dedicated IP address and it never changes yours mate your internet provider may not provide that service and if that's the case and you'll need to use dynamic DNS and that is not we're not going to go into dynamic DNS so I'm going to assume you have a hard-coded IP address so what you want to do is come under here under virtualmin and the first thing we're going to do is we're gonna run the configuration wizard on on virtualmin and that's right down here virtual it tells your virtual means configuration has not been checked click the check button to verify it now so we're gonna recheck and refresh the configuration okay ignore this one up here for now because what's gonna go to you is gonna go down and just go check all these items and tell us what we need to change okay the big one here is the default IP address is set to 192 165 to 11 but the detected external address is actually 64 to 59 229 this is typically the result of being behind a NAT firewall should be corrected on the module configuration page so we'll come back to that and take care of that the other thing is telling you is your post fix cannot can support per domain outgoing IP address currently not configured I'm gonna ignore that I don't use post fix this is a big one your my sequel is installed and running but does not have any root password so we should change that immediately so I'm gonna go to my sequel database module and I'm gonna create a password for it [Music] and I'm gonna change it now okay so if we come back over to virtual mid now we've changed the password and virtual men is going to want to run the update again but the next thing I want to do is we you notice we change it from 5.50 to 5.11 so even though I don't have any virtual servers I'm going to go out here and get rid of this error and all I need to do here is just read this screen the real address it's going to update 5.50 to 5.11 and I'm just gonna go ahead and click on change now and it's going to come back and say there are no virtual servers but you will see once I return and go to virtual men it gets rid of that error message we were receiving bingo okay so the next thing you want to do is open port 80 and port 443 and you want to format you want to forward those to this to your 5.11 or whatever IP address it is that you have the other thing I want to show you is under system settings under virtualmin and right down here this item right here virtual mint configuration now this is very important you can you can change these settings here and really screw things up but the big one that you need to do is right here from the default IP addresses for DNS records you need to change that to automatically detect external address and there's a reason for that because when you're using NAT that needs to know what the external IP address is or a virtualmin does needs to know what the external IP address is in order to create DNS records correctly so I'm going to do that and then I'm going to click on save okay and now I'm gonna recheck anytime you make a change like that you need to recheck and refresh your configuration now this is where things can get a little bit confusing because you've got your private internal IP and then you got your public external IP and you can see the system is ready to use by virtualmin but let's go out and we're gonna create a virtual server and I'm going to show you what's gonna happen when we do that so we just go out here we create a virtual server now and let's just use a domain that I have HTI to XCOM you're gonna give it a administrative password and then and I go under enable features and I take off virus filtering I take off accept mail I take off spam filtering and the rest I leave them all and they're on and the rest I leave alone so now we go out here and create server [Music] let it run and when you're done you should have a virtual server and I do you can see right up here my virtual servers hdit XCOM now that change that we made in the configuration is the reason we see this now so it knows that the website is on the server 5.11 but it knows you have 2x access it by the external IP address so that's good that's a good sign that means it's good now the other thing I want to do is come in here to server configuration and go into DNS records and I want to talk about this for a minute and you can see now it's made its setup all the WWWF TPM localhost webmail admin all the local DNS settings and you're going to see this error up here I don't want you to be concerned about this error normally what you would do is you would create under web min your own name servers and then what what happened is is that you would go out to your DNS registry and point it point that domain to these DNS servers instead of the saya for example I use hover to host my domains so I use hovers domain servers but if I were a web hosting company I would create my own internal name servers like NS 1 and s 2 and then I would point my DNS are my registration to my name servers but that's an extra step I don't really feel I need because I don't do a whole lot of web hosting and it's just as easy for me to go in and to go into my hover.com account use their name servers and just change all of these settings under hover the other thing that allows me to do under under hover which I could do here too is to have a separate mail server and a separate IP address etc so don't be too concerned if you find this error all that means is you haven't set up an internal name server of your own in order to use it so the next thing I want to do is I want to have PHP myadmin installed so I can you know modify my database or whatever I need to do so if you come over here to install scripts you will see that you have some scripts that you can install granted it's limited but the first one I want to do is PHP my admin and I'm good so I select that and then I'm going to click on show install options and then I'm going to read this very carefully so it's going to install it under this database and this is very important install subdirectory under public HTML if I did it at the top level this would be my default website so I don't want to do that I want to install it in a subdirectory which is why it lists that is PHP myadmin and I only need English language so I'm not going to install all languages so I'm going to go ahead and click on install now now you can also do this by just you know FTP into your server and then uploading a file to it and setting it up like this but I like to use the install script just to make things a little bit easier and this won't take long to run okay so if we come back up here to edit virtual server I'm sorry it lets go to edit users because what we need to do is be able to FTP into that server so I could use this account so the account I would use would be HT I TX I would go to you know HT ITX calm FTP into it because I already have an account set up but if you wanted to create additional users prefer FTP you do that right here don't do it ya don't do a batch create users use add a website FTP user access user this is where you would add add those there all right now the other thing I want to do is I want to do an install script and I want to install WordPress so I'm going to go up here to available scripts and I'm going to install WordPress now this time I'm going to install WordPress at the top level because when my users come to my website I just wanted to go to my work WordPress site so I'm going to go ahead and install now [Music] all right now it tells me it's done and I can find it right here to complete the install so what I need to do now is I need to go out and make some changes to my firewall mainly open that port so it forwards to 5.11 so I'll do that and I'll come right back all right so I've made the changes to my DNS now what I'm going to do is I'm going to copy this link yes I'm going to copy this link location and then I'm going to open a new tab paste it and we're going to see if it go if it works and it did so I'm gonna go ahead and continue on with the wordpress install [Music] okay so I just chose a password of password 2017 where they couple of dollar signs in there and I'm gonna go ahead and install WordPress not going to save that password it says it's done now I should be able to log in [Music] and choose login and don't save and there we are and there's our WordPress site now let's see if we can go into our PHP myadmin page [Music] [Music] and there's the PHP my admin page so as you can see it's a fairly trivial process to install webmin install virtual men and to get your domain set up now you could use cpanel you can get cpanel and you can do the same thing I'm doing with web into virtual min by using cPanel and it would cost you about 20 bucks a month to run cPanel a cPanel gives you a lot more features a lot easier to do get it get into it you need to do and but for advanced web hosting I'm just using basic web hosting here I'm not I'm not doing anything special so this works for most of my clients and myself so that's all folks we now have a fully functioning web server I can put any number of virtual domains on there I wanted to I could test them I can run them in fact this is where I'm gonna be hosting my domain from now on my MC STX net domain is going to be hosted on my own internal servers now this is not for the faint of heart it's also not for it's just for a lab environment for you guys that's why I did this video there are certain things you need to be aware of if you do this in a in a production setting you're gonna need to have a firewall up you're gonna need to you know do packet inspection that kind of thing way advanced for what we're doing but for the majority of users this is this is basically you're gonna need open two ports maybe three if used in an FTP server or if you're using SSH you know so that people can get in and out of the server and do what they need to do but you know that's a topic that's a more advanced topic if you're of the commercial industry but for a basic home user it's a great way to set up a web server getting your feet wet learn how it works you know not only if I my programmers that I use I also teach them the backend so that they know what's going on in the backend and how changes affect the back end because there's the front end where all the programming is done and the beautiful user interface and then there's the back end and I always help I always find that when my programmers know how the backend works it makes them more effective programmers they they know what I'm having to face on the back end compared to what they have to do on the front end so there you go hope you found the video entertaining and informative as always give us a thumbs up down below if you liked it give us a donation on PayPal our patreon if you're so inclined and we will see you next time and on the other side [Music] you
Info
Channel: Unkyjoe's Playhouse
Views: 11,789
Rating: undefined out of 5
Keywords: webhosting, webmin, virtualmin, self hosting, ubuntu 16.04.2, ubuntu server virtual
Id: W57xNvAXKfc
Channel Id: undefined
Length: 41min 15sec (2475 seconds)
Published: Thu Sep 21 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.