In: Computer Science
What is the function of the Document Root statement in the Apache configuration file? By default, where is the document root located? If you needed to change the document root, what would you do? What statement in the Apache configuration file tells the server what port to listen for HTTP traffic on?
The Document Root statement is the one where for the given request
the default behavior of the http would be to take the URL request
and add it to the end of the Document Root.
The Document Root Directory default location is
/usr/local/apache/htdocs.
For changing the DocumentRoot we need to edit the apache.conf,
we can search for the
Restart Apache to take effect.
The statement in the Apache configuration file which tells the server what port to listen for HTTP traffic on is the Listen command. The command is used to identify the ports of the Web server which accepts the incoming requests.