What is /var/www/html?

Jason Sherman picture Jason Sherman · Apr 24, 2013 · Viewed 117.4k times · Source

I am starting to pick up PHP / MySQL, but in all the documentation I'm reading, it mentions /var/www/html as being the folder you want to install a framework such as CakePHP, or for example /var/www/html being the folder you want to install your website on, so that everything is in root.

What exactly does /var/www/html mean?

Answer

Stephen Fischer picture Stephen Fischer · Apr 24, 2013

/var/www/html is just the default root folder of the web server. You can change that to be whatever folder you want by editing your apache.conf file (usually located in /etc/apache/conf) and changing the DocumentRoot attribute (see http://httpd.apache.org/docs/current/mod/core.html#documentroot for info on that)

Many hosts don't let you change these things yourself, so your mileage may vary. Some let you change them, but only with the built in admin tools (cPanel, for example) instead of via a command line or editing the raw config files.