2/3 How to host multiple Websites on single EC2 Instance. LAMP stack)(AWS)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi this is the second video of the series of three videos where we will share with you how to install wordpress and host two and more website into a single ec2 server but before you do that you need to watch the first video where i explain how to install lampstate you will need that to install wordpress websites so let's get started [Applause] [Music] in this video i will show you how you can install uh wordpress into your um into your website or how you can host more than one or two or three or as many as a website as you can you can install on the single server uh wordpress website so last time remember we launched a server this server with this ip address so what i want you to do i want you to do the first thing i want you to copy this ip address i'm going to go to your um your domain provider and your domain provider can be any one godaddy or freenom or any any other you go there you will have two website or you have more website if you have more than two website so what i want you to do i want you to go to your domains go to their settings and you need to set a record so paste your ip address save it it should be a record a record yeah go back go back to your domains and do this for the second one as well you need to set a record into your dns settings same ip address paste into this that second domain as well save it go back so now these two domains are pointing towards that that ip address after you set the dns record for each of these domain what i want you to do go to the description and download this document this document is instruction on all the commands that you need to install wordpress 2 website okay so here what you will do you will log into this back into the server and what what you will do you will download um the zip file and you download the wordpress you copy it paste it it will download uh wordpress into your server okay it's done you can clear it and then you need to unzip that folder folder is unzipped clear it after you download the wordpress and unzip that folder what what i want you to do i want you to go type this command and you it will remember you set the password for your mysql database server so you put your password yeah and then you need to create two databases and two users with the password and allocate those two users you need to grant privileges to those two users uh to those databases so the first one first we will create two databases this is the first database that we will create and please you know i'm using this for an example you need to create you need to put your own name you don't have to copy paste everything here you just you have to change the name of the users and the passwords that that you want to set for your websites okay um i will just copy paste here so this is the database for the first website which is created this is database for the second website uh sorry copy paste yeah okay this is database for the if you want to see those databases you type this command and you can see you see this is the first database for the first website database for the second website and in future if you want to delete any of the database you just type this command drop database and here you will replace the name database database will be deleted you don't have to do it now but this command is for the future and here you will create a user with the password you copy it paste it enter user first user has created so this will be the password for the first user and this will be the username for the first user yeah and this second for the second again please do not copy and paste everything as it is yeah you need to change you need to put your own username and your own password okay and then if you want to see those that the users that you made you just type this command and it will show you so this is the user1 as you can see this is the user one this is a user to localhost and everything okay now you have to give um grant to those this so this is the first database name of the first database and this is the user so now what you're telling you're telling you're associating the those users at localhost you're associating them allocating them to their databases okay so you copy them paste enter copy paste enter okay so two so we we we just granted privileges we allocate first user to the first database and second user to the second database now we will flash the privileges that's it exit so that part is done we can clear it okay so next step is we will go into the directory and we need to make two directories i'll show you how yeah and then we'll create directory for the first website and then you will create a directory for the second website okay so two directories have been created so now what we will do we will copy um so what this command will will do this command will copy the wordpress um and configure that wordpress um into those websites yeah it's done and now what you here you will do yeah good no no no what we are doing we copy in this command we copy the wordpress and here we are we are pasting that wordpress uh into those websites to install it in individually on that on those websites so so we successfully there there were no errors so we successfully um copied the wordpress into the first website and the second website and these are the directories that we we made copy paste copy paste i'm not gonna go with any more details on these two just copy and paste them you know these are just to you know um take the ownership of um um of those directories so that's it just copy and paste them as it is so uh here what we have to do we have to um copy paste after typing this command you will type this command just copy it paste it so here what we are inside of the we are inside um the wordpress um wordpress of the first website so here you will change the name of uh you remember we created two databases so we will we will just change the name of the first database my first database was this so i will paste here my second my first user was this i'll come here and i will um i will change the name of the first user user and for some reason i didn't copy it properly okay here copy come here paste and you copy copy the password of the first user copy and here you will paste okay the host will remain local and everything like that yeah and what you will do you will you have to paste this at the end so here you will go down at the end at the end and you will paste you need to paste this okay here okay so you will paste here and then you will go down and then you save it from here it's done so control exit y enter save now you will do the same thing for the second website so you go copy paste and then you configure the second one copy and paste and then you change the name of the database so this is the second database you copy you go down same procedure if you have three website or five website or 10 website or 100 website you have to create those number of databases and you have to create those numbers of users same procedure is for everything so you just paste it this is my second user and my second password was this so i just copy it uh i'm doing this just to save time you have to create your own passwords and own username okay so first is done so now i have to do i have to go all the way down and i have to paste here this line why we are pasting this line if you don't paste this line the wordpress will give you error inside so which i don't want you to have that error so this is done just exit y save that's it so now you have to enable those sites and copy guys i made all this for you like really easy just to copy paste just copy paste here you will paste all this virtual host copy it paste it make sure you change your email address your website you here it should be your first website but here you see my first website i'm configuring my first website so you make sure you change your email address you put your real email address your your website with the correct extension and here you will alias um the first website and he will here also you will change um the the name of the directory okay make sure you change your your these detail before you copy and paste everything otherwise it will not work okay here you will exit you will save enter and same you will do for the next for the second website you copy paste exit y save okay now you need you will enable the first website copy you're enabling the first website and you are enabling the second website okay now we have to restart the server apache okay the server has been restarted i think those website should be working now let's have a look i will type my first website yeah as you can see the first website is working i'll type my second website and the second website is working as well now what we will do i will type our correct language site title i will say site 2 because i'm i'm using the second website so this is site 2. my second sorry this was this is the second one uh my second was example site two yeah because this is the second website example site two and my password was example site to boss yeah let me verify example site 2 pause example site 2 site 2 everything looking fine uh here you will type your your email address email at yourmail.com yeah and that's it yeah and you will type and here we go and same you will do for the first one site one my first username was set one my second password was oh sorry first password was pause confirm here you will type make sure you put your your enter your um real email i'm just doing it for for for just to just to show you just for example that's it login example site one plus okay here we go so we have um you see we have two websites site two and this is the site one both website we are hosting on a single server and here you can do whatever you want you can start creating your website i'm not gonna go on that detail you can figure it out but here the purpose of this video how you can host two website and the same procedure is if you want to host more than two website you just have to create three databases three users with three password and then associate those users with the database remember you you have to remember those username and password and and come here and and just you know just install that um those wordpress on those website that's it for now thank you very much any question put in a comment and i will try to answer them thank you
Info
Channel: SpareStuff
Views: 2,745
Rating: undefined out of 5
Keywords: #aws #awstutorial #awswordpress #wordpress #awstrainingvideos #LAMP #EC2 #WhatIsAWS
Id: QMWwKBFJ9A4
Channel Id: undefined
Length: 18min 39sec (1119 seconds)
Published: Thu Sep 03 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.