O'Reilly logo

Mastering Linux Network Administration by Jay LaCroix

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Apache

Configuring Apache is done by editing its configuration file, which will be located in one of two places, depending on your distribution.

Use the following command on CentOS:

/etc/httpd/conf/httpd.conf

Use the following command on Debian:

/etc/apache/apache2.conf

The default web document directory, /var/www/html, can be changed. While /var/www/html is fairly standard, there's nothing stopping you from changing it should you decide to store your web files elsewhere. If you peruse the configuration file in CentOS, you'll see this directory called out within a configuration block that begins on line 131. If you take a look at the configuration file in Debian, you won't see this called out at all. Instead, you'll see a directory within ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required