The .htaccess files are in the content directories, e.g. DocumentRoot and its subdirectories. You would normally create these file by hand on a per directory basis.
You can create custom error messages by following this doc:
https://httpd.apache.org/docs/current/custom-error.htmlIn the past, I have found a good maintenance mode solution to be starting Apache with an alternative config that changes the document root to a maintenance directory. This directory has no index files, but instead serves custom error documents.
The method I have used for starting Apache with an alternative config, is to add a new option to the init.d script like "maint". One could simply specify the -f <config file> argument as $OPTIONS
in the environment before running # service httpd restart, but I have
found it this way for simple apache configs. The maint option in /etc/init.d/httpd might look like:
<snip>
# See how we're called.
case "$1" in
start)
start
;;
maint)
stop
OPTIONS="$OPTIONS -f $MAINTCONFIG
start
;;
<snip>
Where $MAINTCONFIG is either coded into the init script (preferred) or set in the environment. Then to go into maintenance, simply: