Hi in this screencast. We’ll see them how to implement the virtual host in apache forever with the Tomcat Now suppose we want [to] see the [virtual] question tomcat see my all the videos how we implement the virtual host and Target So what do we issue with the old one we should host in [Duncan] suppose we have Definite which will host in Target all website are located in single missions So suppose you have the big organization each organization want to maintain the server in one that’s being maintained the fifth setting one server But well Tomcat virtual office in town kid. We need [to] maintain all in single machine So it’s not possible for the peak our initiations Suppose this is my structure of the book we have many departments each department [has] different IP addresses Of each house [and] different different Tomcat service these are each only targets on [where] the [cassandra] [Christus] comes in how we process We have the big question because we can’t put the single Ip this is a different different iPs I need to register some public eye piece also So how do we achieve this Richard was concept now we need to put apache HTTP webserver in middle of this request processing so [apache] web server is [accept] all the requests and delegate to the appropriate department based on the request So this is our new structure the instruction we placed the apache web server so all the records comes to apache web server apart from the Delegate direct request service to appropriate departments Now how much server and the Tomcat selected communicate when you see here? Apache service here is working normal browser can communicate directly here. How a pi server can communicate with [these] storage servers Actually there is a one concept is a HP protocol through this protocol both of our service on the Tomcat server can communicate Now when you run down single Tomcat There’s lots of force are binded one put for shadow mode one for fahashi People for the hTTP requests were processed in this spot And one more option code is htTp if you want to need htTPs you enable the spots and one more code is Hp [port]? Usually we are not using this menu [before] anymore, but in this concept we mostly use Php port only We need to that model can communicate between the [apache] htTP server and [tomcats] our power Now steps these are the steps we need to call me for implement the virtual host in apache servers The first one is installed the apache server so I can insert the watch [JK] [let] [me] check a connector then configure the jk. Connector, and finally a pleasure the shadows concept in apache web server Now install the apache web server Now before that we need to download the hTTP server from internet when you search Hatch TPD download you will get the site link in you download the apache web server and Here we build this from source code, so download the source code so [I] downloaded [it] the file now I am going to extract it open the command Prompt [go] to the place down low and then comes here here [insult] script is flying funny darts has come figure – – prefix and We need to enable to model here prefix mean where we need to install the apache server we mentioned the user local apache This pays being going to install the apache server and while installing the apache server What are the module we need to enable it actually apply this to have lots of module now are we interested in to Model? Rate we use this video enable focusing. Maybe we used in next video for load balance inference some kind of possible combinations and When you put touchless country – – [hill] you will see that all the possible? Parameters in the place is lots of parameters, so we go it install mounted touch the skunk here We go to the file system broken Apache apaches begins over here when you can see all bin folder conjugation files Hd dogs everything is [simple] [now] [everything’s] [in] [these] places Now when you go to the modules listen got some modules are pre-installed Okay, now on second step is we need to install the jk, Connector. So in key download the jk, Connector, and we’ll case one When you go to the check-in time just search more Jk character download we can get the edge on download let’s go spread Here [ild] downloaded so they [extract] [it] In Jk. Connect x that is no one folder native means ur the native concrete by taunted Connector Now dot shucks configure with axe user local apache pin effects this file is already present We need to specify that pipe then this [mod] [take] [a] connector find this model Is instantly Share model then we can load the model at any time? Now we install the JK Connect back Now third step is we need to configure the JK character in [this] third strip we service two sub steps one first one is create the work construct properties file and Loads the configured education load under a [Table], JK character module actually when you seen in software in structure each department yet [Concerta] worker So in worker become properties file We need to specify them these Tomcat informations the first one is created a work custard prop this file, so let’s go and first give them sort of religious it Open the natives in Solo local apache and complication production here create the whole document the name is [large] properties Here in this file. We need to specify in this Format now what [care] dot one particular name. We can give me any name and type is which type? we are using a GP thirteen [with] [a] protocol name so a GP 13 and We need to mention the poor composed host is lan the departmental level Tomcat is specified attach IP address and port is not hatched it import you need to use each b. Port and Worker list is what are the list to be provided here? We need to specific [glue] comma Yeah, so in my last video. I only have the multiple Target instance running in single machine now I am going to use that now I have three Tomcat instances I have the script file Spar x again start [the] [phantom] supper. I am going to use that one Okay, now we need to start up [the] 3-ton caves. That’s from the first chunk it I want the internet and free running three Target in stresses Check my old video about the how to run the multiple talk and instructive in single machine now local host a 1001 Tomcat funny local host A Donate one Another Tomcat is running some other one if I put on small cage and Of course is to say to a to another page is honey This is what emotionally I put on default sample page now. We are running a localhost:8080 Eight one eight one eight two eight and three targets instance are hanging okay now We need to create the [walker] start up top [each] [pen] so here For peridot worker dot we can give any name so I’m giving counted 21.5 we are using the ag before to 81 3 version number now One dot [Tomcat] One dot coast now we are running this machine Local Khorsandi Protocol Otherwise we can [specify] the [where] this target instance is running actually so [knowing] what dot Tomcat one Boat here it is not h to put we use them as you put this is department. [ht] [P13] user type and The Port number is a G4 So when you see here, this is my Tomcat check the in [Souder] xML file Ok this is a htTP port h0 h0 actually we don’t want this one, and this is htTp port now. It is a disabled and This is an HB potter when you see here the protocol is a cheaper one [ring] And this is a port so we need to use that port So we know we don’t know [ok] the one worker is created now. We have three target instances for need to create totally three Tomcat workers All [are] type is a GP one change the value [two] and this one is If you can give any name let’s [motion] Now my all our post is talking about sternly, but [fort] isn’t going to change My instance is fearsome and check that [sounded] x modified This one is [knaves] [wrote] [in] Okay, now check the another instance three composition so that a commotion this thing eleven One three [workers] created. We need to give the list worker [not] list So I am typing Welcome dot list volta this mean. We’re down clip one pump it one two three That’s it now. What [come] down step up this file is creator. So the free pan one step is completed The second step is now we need to add the entry into the htTPd config file So then you go here This one coil httpd.conf inside this is a configuration file for apache server So we need to add some increase Now we have mod Jk file and Okay, now you need to add the module Or see the code now. We need to add the model Jk Model is already present, but it is not loaded so we need to specify [this] lower the module then second is the kingdom the Recently we created our custard from big file. We need to specify use this file so here Lower body and give any name now here is ek volume Now this we need to kill the where you can find out let’s go unfold the models [smash] one shaking doctor spoke When you see here is apache Modules there is a module data. So we need to expand this finally to low it then second in checking you can workers five Workers type space play that place we will put it in comic-con [cash] This type are included for some country Then some remaining modules see when you see here. This is log file entries. So we just copy paste to their locks a laxative This is nothing is changed suppose any this Modular Connector is barber this request [the] entries are stored in the [clock] [peg] So just this is a constant only need to copy the blog entries. We need to copy and paste it now [this] part is completed now The step is completed We go the next step next step is we need to get it into the htTPd to compare Now this entry Jk mode which comes to model only chicken model of you? So we added here only Now we are putting So let me check in Mount Slash Okay, now we need to create a folder and then and Now let’s check it here now our host first one department one Department to Department three, [okay] now. We have three three transit instances in out um that Context is one is [department] one the second term cap is contacts is stop department [to] and third one is Department three Now if you search Department two in this one you won’t get it In this term can have department one only means this term can department to one so [one] it’s like this Now we need to add this increase in HtTp [d] dot config file? so yeah [photos] Department  Any request contains [a] department one go to the witch worker? We already have 3 worker 3 workers now This is a first term [key] to the finding to [the] second campaign turton get it now department one The many requests how department one [me] It’s goes to the first term get the first term conveying is Tomcat one so this event Can’t get one Thanks for this probably [useful] now [contains] any requests have department [-] – then go to Target do and Department [ask] nearly 1/3 of [tonkin] [team] just to save it Then now go to user now we going to start apache server Fetching B Dot slash Magic control [for] the CtF stop apache started now go to the browser and Proposed actually apache learning aids report so party started now anyone asking here Department 1C Department one is coming here anyone asking Department to Department – that’s been my second [Tom] can see the target this Duncan is instance is coming Department 3 another Target, so when you see here Can you can ask questions like this? This will suppose to take this video suppose. I’m asking wrong kid come anyone anywhere amperior come is I am putting in host file, so it’s big. It’s the local host only saudi [caught] one one slash index dot htML So this apache web server. [I] [want] [to] check amount module check it out department one mean What need to do send it that this worker? with like this So while going here they remove the front end [they] only they send in [a] department one dot Index.html – so department one is say this context to the stump get context [so] take care everything suppose install Localhost when you type W dot funky calm? You will get same result because [anyway] round he not come under these are bring it again to the overflows from [Beaker] Okay, now this part is completed, but what we want we don’t want like this from killer comes to ass department one or [romkey] Dot-Com staff [department] – we don’t want like this. We want life is From period comes – that are extrema, but [ok] we mean it [-] something into converter this one – this [five] is for you So before that we need to obtain a richer first our final step we need to operate a wish list Now listen aids series which bought [quite] [a] service listen this already this line is there now we need to Going to implement this model virtual host module in this virtual rules. We mentioned that [forth] number eight zero find the port number and The server name is which serve running the business domain name actually this is actually is working It’s likely the template using the host Header field so we need to mention that which server name Then the Jack amount is be put before that we put outside. We need to bring it inside like this Let’s see In order that stifling and when you see here, we can hold it this value anywhere So I am putting here [to] [perform] They are giving input X means this directive specifies it bad our virtual host servers are we put it off which ethernet we have already have only one your Studies and same [fie] everything now we need to put the virtual host to this database So first start calling a pro man. We need to look at Okay, here, we put seven e and w dot My car, okay, then we need to put the jake amount to bring the table here checking [month] [E] [part] of the Moment one star Then what we need to do then Target one? Which worker need to take it [Tom] can work at one so just [drop] [it] This one is Christian and this is [t] 1 t 2 this one is below Dot and This is Department three and Target three save the file and Come down and remove the same keys Now go to the apache control and stop the server and start it again Now let’s see before the donkey step roncador comes, just department three Sporty, but now It’s not working shang comm 54 Event to See the same [one] is coming, but here when you access a department 1 or 3 You won’t get it this particular department is going to particular places only So here a part htTP server we mentioned that here the same kind of thing now anyone asking rom-Com then goes to this module Anyone asking Christian going to this module now wrong cannot come is going here here that person asking the wrong key becomes Less Department 1 then only goes to the Tomcat 1 Tomcat comes – Department 1 dot index.html, but I don’t want to seem like this. I want like this [from] [p.com] slash Index dot HtML Somehow we need to add this automatically instead of them. We manually entered So due to the purpose be using the period model period Module is the one engine is the target right? We need to add the rewrite [module] See here rewrite the same one need to add some extra code now rewrite engine is fun now This is log to generate the log file per unit and this is the important the Pr8 Rule Individual this is a regular expression if it’s matched we I am putting the starter D anything Something and anything comes [zip] from starting until to the end so anything comes inside Take capsule that one and append with Department  Now let’s see here now 3/8 Inch Not even taking this on now read a clock 21. I don’t want to log fine fine. Just take item 3 right [roll] [now] [read] [it] roll is started with the small and Slash Is just disappearing anything unique content is coming. This is the end [so] far end anything is can then just make it three four men one cash Dollar One what they captured here [its] abundant in this area and apply like we mention that this is the last rule and also through the Proxy here Instead of the formal one we just mentioned it star that dollar anything [slash] star, so this is a new input. Just [above] the end is to [please] everyone and This is not it three and [this] will [department] three this is a tea party to Now start and stop there, so let’s stop that study it again now Now take the cushion to [Crostinis] now. No [need] to [carry] anything enter Now Christian is [sent] [and] directly opens [in] Tomcat server and same thing is Logged on keep calm. It’s open the moderate coordinate [way] So this is the structure now it is in use it up now The person asked me roncador come only they not mentioned that Department one department to anything apache service Similar accused with the department one the small rate rule is update here Before you are it is processed the url is rewritten by the rewrite module the raided module check them request it’s come for me then put the [department] one appended and send it to the Tomcat one if it’s like that only when Christians coming they realize the model and sent to the tomcat [-] this light is always Which will host concept in apache server? Thank you for watching?