Add DocumentRoot location (#22799)

pull/23033/head^2
Jason Hall 2018-11-26 04:59:24 -05:00 committed by Kristofer Koishigawa
parent ddb6aa13c7
commit aa2adb9338
1 changed files with 28 additions and 0 deletions

View File

@ -21,3 +21,31 @@ sudo yum install httpd
```
pacman -S apache
```
### Getting Started
Once you have Apache installed you need to know where to put your HTML documents. This location is generally referred to as the `DocumentRoot`. This location is usually `/var/www/html` on most Linux systems. Follow the instructions below to find the configuration file for Apache and the `DocumentRoot`.
#### Command
```
~$ sudo grep "DocumentRoot" -R /etc/
```
The `-R` flag will cause grep to search recursively through the `/etc` directory and print out the full path of the file that it finds the `DocumentRoot` keyword in.
#### Ubuntu output
```
/etc/apache2/sites-available/000-default.conf: DocumentRoot /var/www/html
/etc/apache2/sites-available/default-ssl.conf: DocumentRoot /var/www/html
/etc/apache2/sites-enabled/000-default.conf: DocumentRoot /var/www/html
```
#### Centos output
```
/etc/httpd/conf/httpd.conf DocumentRoot /var/www/html
```
#### References
- Installation and Configurations guides
- [Ubuntu](https://tutorials.ubuntu.com/tutorial/install-and-configure-apache#2)
- [CentOS](https://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-apache-config-ui.html)
- [Arch Linux](https://wiki.archlinux.org/index.php/Apache_HTTP_Server)