‫in this lecture of the course, we will learn ‫how to change a port of a shamp server so
‫let's suppose that in the previous lecture ‫when you were installing XAMPP and when you
‫actually were starting this Apache web server ‫the XAMPP gave you an error and the Local Host
‫was not working this is due to a conflict with ‫the port so in this lecture of the course we're
‫going to learn how we can go ahead and how ‫we can change our port so that you do not
‫get that error. now even if you did not get that ‫error in the previous lecture I would recommend
‫you to still change your port and the reason for ‫that is because Apache basically uses port 80
‫which is the default port and sometimes let's ‫suppose that if you install any of the software
‫and that also uses the 80 Port then that is ‫going to conflict all right and due to that
‫conflict the Apache web server is not going ‫to work or even if you
‫install any other software that software may not ‫work so Port 80 is a very commonly used port and
‫that is why I would recommend you to change it ‫now let's see how port 80 is working in
‫the background so basically this xampp actually ‫uses port 80 which means that if if I type
‫in there Local Host this is actually running as ‫a port 80 behind there there is actually a port
‫which is colon 80 which is already there and if ‫I hit on enter it's running it's there but the
‫Chrome is actually hiding it and the reason for ‫that is because all of the HTTP based website
‫has a default Port of 80 so if you type in there ‫basically let's ose example.com and then you hit
‫on enter Then you can see that this is actually ‫the https website but let's suppose that if I try
‫to access this this with the HTTP instead of the ‫https and then I type in there colon 80 and then
‫I hit on enter it actually runs because behind ‫the scenes there is actually a port which is 8
‫Z which is there for every http based website so ‫similarly with the Local Host as well we already
‫have got the colon 80 Port but sometimes since ‫this website is on our own computer this port
‫basically conflicts and due to this confliction ‫uh the software that we will install on our
‫computer or the Apache is not going to work so ‫that is why it is highly recommended that you
‫do change your Port so that you do not get any ‫of the conflicts and how you're going to change
‫the port it's really simple what you have to do ‫is to first of all stop your server stop your
‫server and then you have to actually next to the ‫Apache we have got this config all right so you
‫need to click on that and then you have to click ‫on this Apache httpd.conf all right once you are
‫on this file then you have to go down and right ‫here here you can see that we've got this listen
‫8 Z so instead of this 80o you have to change ‫this to like let's suppose it if you want our
‫new port to be 8080 which is going to be for ‫our locally hosted website all right you can
‫change that then you can go down a bit more and ‫remember whatever you have written over here you
‫need to add that as well one more time so let's ‫go down let's go down a bit more and right here
‫you can see that we've got the server name ‫Local Host colon 80 so make sure to also add
‫whatever you added at the top which is going to ‫be 80 80 once you're done with that then you can
‫actually click on the file and then you can click ‫on Save that's it once you're done with that then
‫you can actually close this file all right ‫now if we go ahead and if we start this then
‫you can see that it's been started and our Port ‫is actually 8080 and if we also start this this
‫is going to be same and now if you go ahead and ‫you visit the Local Host colon 80 all right you
‫can see that it is not going to work it says that ‫Local Host refus to connect because we access the
‫local host and even if we type colon 80 or not ‫the Chrome will automatically add the colon 80
‫because that is the default Port since we have ‫changed the port now that is why every time we
‫will visit the website we will type in there ‫colon 80 80 so that the Chrome will know that
‫okay the port is actually changed and changing ‫the port is really much recommended so what you
‫have to do is to type in their Local Host colon ‫8080 and then you have to hit on enter and then
‫your website is going to be loaded so make sure ‫that you do change your Port if you do not want
‫to change it it's up to you but chances are that ‫you may get difficulties so that is why it is
‫highly recommended that you do change your Port ‫even if you got the error in the previous lecture
‫or even if you don't it is recommended to change ‫the port all right that's it so now in the next
‫lecture of the course we're going to learn how ‫we can go ahead and how we can install WordPress
‫on this champ and we can continue this course ‫and build this website together step by step