Advertisement
Tritonio

Apache2 Main Server Document Root Location

Mar 17th, 2021
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. I did find some documentation that mentioned, "Any request that doesn't match an existing <VirtualHost> is handled by the global server configuration, regardless of the hostname or ServerName" (http://httpd.apache.org/docs/current...ame-based.html). So I decided to do a search on "global server configuration", and it seems that in previous versions of Apache for Ubuntu (and still in other distros), the main configuration file is /etc/apache2/httpd.conf instead of /etc/apache2/apache2.conf.
  2.  
  3. And there is a Document Root section in that ../httpd.conf file. So, I did some experimenting, and it seems that you can still set this through adding
  4. Code:
  5.  
  6. DocumentRoot /your/preferred/directory
  7.  
  8. to either /etc/apache2/apache2.conf or /etc/apache2/ports.conf.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement