Configure Apache Virtual Host

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi friends welcome to tech blog and in this video I want to show you how to configure V host on Ubuntu in order to do this we need to pray install lamp server to show how to set up lamp click on below link that appears on the screen virtual hosting is a method for hosting multiple domain names with separate handling of each name on a single server or pool of servers this allows one server to share its resources such as memory and processor cycles without requiring all services provided to use the same host name [Music] as you can see I have installed lamp on my abun to 17.04 all are working fine here you can see Apache PHP Misco now what we have to do first create users for the host so get back to my terminal and create user a and user a B use the command sudo user a - M user a [Music] after that created directory under the user a directory with name public HTML and similarly do the same for user B [Music] you can see the directory which I have created in file explorer basically it's empty so what we have to do create a HTML file and write some markup text to understand which vhosts it's represent for both of user [Music] so get back to your terminal and create a file named index.html I am using nano editor to do this write some markup as you wanted to represent your V host do same for user a be the breast control excellent way to save the file [Music] [Music] [Music] now go to your Apache directory followed by CD slash etc slash Apache through here in find a directory site available go ahead and enter into this directory you will find the default configuration file named triple 0 default config now what you have to do copy that file format both user just use the CP command create two files as the name of my user in my case its user dot config and user be config [Music] now go ahead and add or change the following line the document root is your public HTML directory by default for Apache it is far' triple W so we need to change the document root as per our requirement here in our case it's home then specific user than public HTML server name is my domain name and survey administer admin email for that particular domain you can leave it as usual or set yours [Music] [Music] fallout symlinks means if a directory is a symbolic link the NEPAD she follow the link allow override directive is used to allow the use of dot HT access within the web server to allow overriding of the Apache config on a pada rectory basis require or granted means no IP address is blocked from accessing the service [Music] [Music] do the same for you sir be [Music] [Music] [Music] [Music] [Music] [Music] now you have to enable both of site by using command a to n site then your config name [Music] do the same for user B now you have to reload your Apache and then restart its require authentication put your Sutter password and go ahead [Music] oops there is something wrong with the syntax [Music] let's find the error in lock if there is an error at line no.7 teen in config file let's check [Music] it should be options instead of option now restart your Apache [Music] here you can see a patchy status yeah it's works [Music] now it's time to identify your domain in a local environment go ahead and add a record boomer domain at localhost do the following [Music] you now get back to your browser and type your domain name in my case it is www.hsn.com and www.hsn you can see the page is served from the host user a similarly you can see for user a be serve its own page you can see who all are doing well thanks for watching this video if there is an acquirer leave a comment in comment section don't forget to Like share and subscribe us have a good day bye bye
Info
Channel: Tech Blog
Views: 69,305
Rating: 4.6136918 out of 5
Keywords: Virtual host, Vhost, LAMP, Apache, ubuntu, Configure, config apache virtual host, apache virtual host, apache virtual host tutorial, apache namevirtualhost
Id: R0WHr_MCzsU
Channel Id: undefined
Length: 10min 55sec (655 seconds)
Published: Tue Nov 14 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.