Virtual Host on Ubuntu with XAMPP

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let's now set up a virtual house on the Punto if you haven't yet open the terminal so go to search and type terminal and the first item here is a terminal obviously so if we click on that item that comes up with the terminal window and we're going to start by navigating to one of the folders CD for change directory and then the path is opt lump which with double P at the end and an et Cie hit enter now in we are inside of this directory as you can see this path here if we try and see what files we have by using the LS command you can see we've got one of the files that we are interested in is this httpd.conf so let's now open it with Nano editor and we need to open this file with administrative privileges so we're going to use the sudo command sudo and Nano editor and let's specify it which line we want to open this file the line may not be exactly the same when you're actually watching this video because obviously the files the updated files of example installation may change but at the time of this recording the line inside of them httpd.conf file is 488 and then we specify what file we are actually referring to which is httpd.conf and if i now hit enter it's going to ask me for the password so I'm going to type my password hit enter again and as you can see it's spot-on on the virtual host line if you can see the same line then you can use control-v to search Fargo and towards the bottom of the file or control Y to do the same going towards the top of the file so we need to uncomment it by removing this hash symbol from the beginning of this include line now we can save it so ctrl X as you can see here this comment here so ctrl X then Y for Save Changes and simply enter or return on your keyboard to save the file with the same name so that's been the changes have now been applied to this file the neck fear file is inside of this extra directory so we navigate the first CD then we go extra and hit enter now LS to see what files and folders we have fear and if are we which we are interested in is the one we've just included uncommented the line which which was actually including this which is this httpd V house Kampf so let's simply open this file the same way as we've done before sudo nano this time we're not going to be specifying any line HTTP D - V host conf and hit enter and now let's scroll down to the bottom of this lines our control V to scroll down to the pages now as you can see the last block is what we are actually going to copy this virtual host so let's simply select everything copy and let's move our course on using our arrows on the keyboard and now simply paste it so using our mouse simply paste and if I now quickly remove if we move the cursor up and right till the end of the line if you were watching previous videos you know that to go to the end of line is simply ctrl e on your keyboard and let's start removing we don't need this custom lock we don't need errorlog unless you want obviously keep track of all these errors and then let's go to this line and remove the server admin as well and the only thing we need is basically these two lines here in order to find out what path we need for our document truth let's open the new terminal window if we go to file and then open tap and now let's navigate to our home directory which is simply CD and the tilt symbol this curly line - like and hit enter now we are inside of our home directory if we simply type LS to see all of the files and directories you can see we've got desktop downloads and so on we want to navigate to the desktop so CD desk top it's let's hit enter LS against to check what we've got on our desktop you might have some items I am going here and now I'm going to create a new directory for our project so it's going to be m'kay dear make directory shortcut for and what I'm going to do the directory name is going to be simply PHP course let's hit enter now if I do LS you can see this directory has been created so I'm going to navigate to this directory CD PHP course and hit enter now LS obviously nothing's inside of our PHP course directory it because we haven't created anything let's perhaps create the file straightaway which we're gonna be able to call later on inside of a browser window so let's create a new file using nano editor so Nano and index dot PHP and simply hello with the exclamation mark type anything you want this chance to test whether the basically the installation has succeeded so a control X now to is to leave the the edits are wife to save the changes and obviously the filename we're going to specify in Dec those PHP so hit enter and this has created the new file with the content way we've basically put in there so if we now do LS you can see this file has now been created but another thing we need to basically get from here is the path to the specific direction and to display the path to the current directory we use the PWD command and hit enter so this is the path let's copy it go back to the previous sub and replace this documentroot with this new table a path sorry if I just remove everything and I'll simply paste what I've just copied this path to our PHP course directory and let's a server name let's remove this default one and simply type PHP course dot death let's now create a directory block so direct very directly and now the same path as we specified earlier so in between a double quotes we are going to paste this path to our projects directory and we close the directory this is to specify by setting the permissions on the specific diet reserved require all granted and I can just use the top here too so yeah let's go ctrl a to the beginning of the line and use the top to align them all same way okay so that's now done let's hit control X then Y and return on your keyboard that's now been saved let's now clear the console window by typing read set and hit return on your keyboard now we can navigate to the e.t.c directory so change directory directory CD for its lush etc' hit return again and now if we do LS to see what files and directories we have inside of this etc' directory you can see there is a file called called host this is the one we are interested in so sudo nano house hit Enter or return on your keyboard now move your cursor down using arrows on your keyboard and type 1 2 7 0 1 sorry 0 0 point 1 and let's specify the subdomain want to use which is going to be PHP course dot def if you want to create any extra virtual house simply type them on the second line on the next line basically using the same IP address and then specify them sub domain you want to use now we are done with this file so control X Y to save changes and we're keeping the same filename so simply return or enter your keyboard the file has now been saved let's now navigate to CD and we go for opt lamp and let's see what files and directories we have here the one we are interested in is this manager - Linux x64 run and this is the file but that basically triggers them there's some control panels so we are going to use sudo dot for its lush and manager Linux - x64 don't run and hit return on your keyboard this will open the sample control panel and now let's navigate to the manage servers and we are going to only start the Apache for the time being so click once web about you've selected what you observe it basically click on this start button that's now starting the server and it should go live in just a moment yep there we go running so now let's open Firefox or any other web browser you might have installed if we now navigate to PHP course don't def you can see the page we've created le the file index dot PHP is now called inside of our browser window that means obviously that it's pointing that way virtual house sub domain basically points to the right directory on our desktop
Info
Channel: Sebastian Sulinski
Views: 18,315
Rating: 4.9674797 out of 5
Keywords: Virtual Hosting, Ubuntu (Operating System), XAMPP (Software)
Id: 2UbpmSNr48c
Channel Id: undefined
Length: 9min 48sec (588 seconds)
Published: Tue Oct 28 2014
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.