1) What's the command to stop Apache? kill the specific process that httpd is running under, or killall httpd.
If you have apachectl installed, use apachectl stop.
2) What is mod_vhost_alias? It allows hosting multiple sites on the same server via simpler configurations.
3) What does htpasswd do? It creates a new user in a specified group, and asks to specify a password for that user.
4) If you specify both deny from all and allow from all, what will be the default action of Apache? In case of ambiguity deny always takes precedence over allow.
5) How do you change the default web root? The solution is to change the DocumentRoot in httpd.
conf file.
6) How to do URL Rewriting using Apache? By using Apache module mod_rewrite we can do url rewriting.
It is a really sophisticated module which provides a powerful way to do URL manipulations.
7) How do you set up Apache to require a username and password to access certain documents? By using htpasswd program we can apply authentication to certain documents.
For detailed steps, go to: http://www.
apacheweek.
com/features/userauth 8) How do I turn automatic directory listings on or off? If a client requests a URL that designates a directory and the directory does not contain a filename that matches the DirectoryIndex directive, then mod_autoindex can be configured to present a listing of the directory contents.
To turn on automatic directory indexing, find the Options directive that applies to the directory and add the Indexes keyword.
For example: Options +Indexes To turn off automatic directory indexing, remove the Indexes keyword from the appropriate Options line.
To turn off directory listing for a particular subdirectory, you can use Options -Indexes.
For example: Options -Indexes