Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
Does the Document Root Point to the Location of your Files?
Another consideration is whether your web server is pointed at the correct file location.
Each virtual server in Apache or server block in Nginx is configured to point to a specific directory. If this is configured incorrectly, the server will throw an error message when you try to access the page.
In Apache, the document root is configured through the DocumentRoot directive:
. . .
This line tells Apache that it should look for the files for this domain in the /var/www/html directory. If your files are kept elsewhere, you'll have to modify this line to point to the correct location.
In Nginx, the root directive configures the same thing:
¬†¬†¬†¬†listen 80 default_server;
¬†¬†¬†¬†listen [::]:80 default_server ipv6only=on;
¬†¬†¬†¬†index index.html index.htm;
¬†¬†¬†¬†server_name example.com www.example.com;
. . .
In this configuration, Nginx looks for files for this domain in the /usr/share/nginx/html directory.
Jun 9, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening