Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between the 'www' folder and 'htdocs' folder?

Tags:

html

php

apache

web

After I installed Apache on my web server there was created a folder called www. Whatever files like HTML and PHP files I put there it will be on my website.

However, I followed one of the tutorial on YouTube and also even my own XAMPP folder has a htdocs folder which is the same as the www folder. When I put a file inside I can see it if I type its name after localhost. Is there any difference between these two? How have we defined these directories as a container of our files?

like image 505
Bernard Avatar asked Feb 22 '14 00:02

Bernard


People also ask

What is the meaning of Htdocs?

htdocs stands for “HyperTextDocumentS”. It is a folder name used in xampp. In there you can your own user defined folder for storing data. It is basically web server solution package and kind of virtual server.

What is htdocs folder in xampp?

This directory will store file data collected for web pages that you test on your XAMPP server. The htdocs folder should already contain data to help configuration of the web server. But you should store your own projects in a new folder (like 'Test Folder' for example).

Where is htdocs folder?

4 Answers. The htdocs folder can be found in /opt/lampp/ . You can navigate to your root folder from the file manager (nautilus by default), by clicking on Other locations from the sidebar, then Computer . From there you can find the opt folder that contains the lampp folder.

What is inside Htdocs?

htdocs is your default document-root directory, so you have to use localhost/index. html to see that html file. In other words, localhost is mapped to xampp/htdocs , so index. html is at localhost itself.


1 Answers

There is no difference. You can configure Apache httpd to use any folder with appropriate permissions as the root server directory. www is just a conventional directory to use.

like image 132
jeremyjjbrown Avatar answered Sep 23 '22 21:09

jeremyjjbrown