Solution :
The web server document root (often referred to as the docroot) is where you put all the files your website needs to function.
The web server document root (often referred to as the docroot) is where you put all the files your website needs to function.
The path to your web server’s default docroot varies depending on the following:
- Operating system
- Web server software
- Hosting provider (if you use one)
You can use virtual hosts and server blocks to run more than one website on a single machine (e.g.,
company1.example.com
and company2.example.com
) or override the web server’s default docroot without changing it.
To find the docroot on your server:
- Open one of the following files in a text editor:
- Ubuntu
/etc/apache2/sites-available/000-default.conf (Apache) /etc/nginx/sites-available/default (nginx)
- CentOS
/etc/httpd/conf/httpd.conf (Apache) /etc/nginx/nginx.conf (nginx)
- Search the file for
DocumentRoot
orroot
.Typically, the default Apache docroot on Ubuntu and CentOS is/var/www/html
whereas the default nginx docroot on CentOS is/usr/share/nginx/html
. For example:- Apache + Ubuntu/CentOS
DocumentRoot "/var/www/html"
- nginx + CentOS
root /usr/share/nginx/html
No comments:
Post a Comment