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

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


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.


Depending on the configuration of the server or the system, you can use the folder where the files of your web application are copied (.html, .php, etc.). This folder have different names, but basically it is a folder with "permits public access".

The folder can be called this on Linux systems:

  • htdocs
  • public_html
  • www

In OS X (Apple), this folder is called "Sites", and in Windows Server it is called "WWWroot".


It really all depends on the server configuration. Sometimes hosts will configure www to be document root, sometimes htdocs will be for other applications (this is just an example).

Either way, both are public and there is no difference as far as standard configuration goes.

Like I said though, it really depends on the server configuration.

All of your configured settings can be found in httpd.conf