Thursday, June 23, 2011

Apache Interview Questions

1) What's the command to stop Apache?

kill the definite process that httpd is running under, or killall httpd. If you have apachectl installed, use apachectl stop.

Apache

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 clarification 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 beyond doubt sophisticated module which provides a excellent way to do Url manipulations.

7) How do you set up Apache to need a username and password to way safe bet documents?

By using htpasswd program we can apply authentication to safe bet 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 include 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, take off the Indexes keyword from the approved Options line. To turn off directory listing for a single subdirectory, you can use Options -Indexes. For example:

Options -Indexes

Apache Interview Questions

No comments:

Post a Comment