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?
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.
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).
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With