apache
TRANSCRIPT
![Page 1: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/1.jpg)
APACHEAPACHE
INSTALLATIONINSTALLATION
CONFIGURATIONCONFIGURATION
- BY MANISH - BY MANISH BOTHRABOTHRA
![Page 2: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/2.jpg)
APACHEAPACHE
Apache Tomcat is an open source software implementation of the Java Servlet and JavaServer Pages technologies.
The Java Servlet and JavaServer Pages specifications are developed under the Java Community Process.
![Page 3: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/3.jpg)
INSTALLATIONINSTALLATION
![Page 4: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/4.jpg)
Installation
Apache
The first app we will install is the web server Apache. To get started open your console and type: sudo apt-get install apache2
After you put in your password and accept and a short wait you should have a working installation of Apache. To test it point your web browser to http://localhost
![Page 5: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/5.jpg)
![Page 6: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/6.jpg)
![Page 7: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/7.jpg)
Ensure the selected JRE is a full JDK and is of a version that will satisfy Apache Tomcat (this scenario was written using SUN JDK 1.4.2_06). If
necessary, you can click on Installed JREs... to add JDKs to Eclipse.
Click Finish .
![Page 8: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/8.jpg)
CONFIGURATIONCONFIGURATION
![Page 9: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/9.jpg)
1.AcceptFilter directiveSyntax: AcceptFilter on|off
Default: AcceptFilter on
Context: server config
Status: core
Compatibility: AcceptFilter is available in Apache 1.3.22 and later
AcceptFilter controls a BSD specific filter optimization
![Page 10: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/10.jpg)
2.AcceptMutex directiveAcceptMutex directive
Syntax: AcceptMutex uslock|pthread|sysvsem|fcntl|flock|os2sem|tpfcore|none|default
Default: AcceptMutex default
Context: server config
Status: core
Compatibility: AcceptMutex is available in Apache 1.3.21 and later.
AcceptMutex controls which accept() mutex method Apache will us
![Page 11: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/11.jpg)
3.AccessConfig directiveSyntax: AccessConfig file-path|directory-path|
wildcard-path
Default: AccessConfig conf/access.conf
Context: server config, virtual host
Status: core
Compatibility: The ability to specify a directory, rather than a file name, is only available in Apache 1.3.13 and later. This directive will be eliminated in version 2.0.
![Page 12: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/12.jpg)
This feature can be disabled using: AccessConfig /dev/null
Or, on Win32 servers, AccessConfig nul
Historically, this file only contained <Directory> sections; in fact it can now contain any server directive allowed in the server config context.
However, since Apache version 1.3.4, the default access.conf file which ships with Apache contains
only comments.
![Page 13: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/13.jpg)
4.AccessFileName directive
Syntax: AccessFileName filename [filename] ...Default: AccessFileName .htaccessContext: server config, virtual host
Status: coreCompatibility: AccessFileName can accept more
than one filename only in Apache 1.3 and later
![Page 14: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/14.jpg)
For example: AccessFileName .acl
before returning the document /usr/local/web/index.html, the server will
read /.acl, /usr/.acl, /usr/local/.acl and /usr/local/web/.acl for directives, unless they
have been disabled with <Directory />
AllowOverride None </Directory>
![Page 15: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/15.jpg)
5.AddDefaultCharset directive
Syntax: AddDefaultCharset On|Off|charsetContext: allStatus: core
Default: AddDefaultCharset OffCompatibility: AddDefaultCharset is only available in
Apache 1.3.12 and later
![Page 16: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/16.jpg)
AddDefaultCharset On enables Apache's internal default charset of iso-8859-1 as required by the
directive. You can also specify an alternate charset to be used.
For example:
AddDefaultCharset utf-8
![Page 17: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/17.jpg)
6.AddModule directive
Syntax: AddModule module [module] ...Context: server config
Status: coreCompatibility: AddModule is only available in
Apache 1.2 and later
For example: AddModule mod_include.c
![Page 18: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/18.jpg)
7.AllowOverride directive
Syntax: AllowOverride All|None|directive-type [directive-type] ...
Default: AllowOverride AllContext: directory
Status: coreAllowOverride is only valid in <Directory>
sections, not in <Location> or <Files> sections, as implied by the Context section above
![Page 19: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/19.jpg)
8.AuthName directive
AuthName directiveSyntax: AuthName auth-domain
Context: directory, .htaccessOverride: AuthConfig
Status: cor sets the name of the authorization realm for a
directory
![Page 20: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/20.jpg)
It must be accompanied by AuthType and Require directives, and directives such as AuthUserFile and AuthGroupFile to work.
For example:
AuthName "Top Secret"
The string provided for the AuthName is what will appear in the password dialog provided by most
browsers.
![Page 21: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/21.jpg)
9.AuthDigestRealmSeed directive
Syntax: AuthDigestRealmSeed secret-real-stringContext: directory, .htaccess
Override: AuthConfigStatus: core
sets a per realm secret nonce prefix which is used to ensure that a captured username, password and realm string during a Digest
exchange cannot be replayed at other places.
![Page 22: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/22.jpg)
10.AuthType directive
Syntax: AuthType Basic|DigestContext: directory, .htaccess
Override: AuthConfigStatus: core
This directive selects the type of user authentication for a directory. Only Basic and Digest are currently implemented. It must be
accompanied by AuthName and Require directives, and directives such as AuthUserFile
and AuthGroupFile to work.
![Page 23: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/23.jpg)
11.BindAddress directive
BindAddress directiveSyntax: BindAddress *|IP-address|domain-name
Default: BindAddress *Context: server config
Status: coreCompatibility: BindAddress is deprecated and will
be eliminated in Apache 2.0.
![Page 24: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/24.jpg)
For example:BindAddress 192.168.15.48
BindAddress can be used as an alternative method for supporting virtual hosts using multiple independent servers, instead of
using <VirtualHost> sections
![Page 25: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/25.jpg)
12.BS2000Account directive
Syntax: BS2000Account account
Default: none
Context: server config
Status: core
Compatibility: BS2000Account is only available for BS2000 machines, as of Apache 1.3 and later.
![Page 26: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/26.jpg)
BS2000Account directive is available for BS2000 hosts only.It must be used to define the account number for the non-privileged apache server user (which was configured using the User directive).
![Page 27: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/27.jpg)
13.CGICommandArgs directive
Syntax: CGICommandArgs On|Off
Default: CGICommandArgs On
Context: directory, .htaccess
Override: Options
Status: core
Compatibility: Available in Apache 1.3.24 and later.
![Page 28: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/28.jpg)
14.ClearModuleList directive
Syntax: ClearModuleList
Context: server config
Status: core
Compatibility: ClearModuleList is only available in Apache 1.2 and later.
This directive clears the list. It is assumed that the list will then be re-populated using the AddModule directive.
![Page 29: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/29.jpg)
15.ContentDigest directiveSyntax: ContentDigest on|off
Default: ContentDigest off
Context: server config, virtual host, directory, .htaccess
Override: Options
Status: experimental
Compatibility: ContentDigest is only available in Apache 1.1 and later
This directive enables the generation of Content-MD5 headers as defined in RFC1864 respectively RFC2068
![Page 30: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/30.jpg)
16.CoreDumpDirectory directive
Syntax: CoreDumpDirectory directory-path
Default: the same location as ServerRoot
Context: server config
Status: core
This controls the directory to which Apache attempts to switch before dumping core.
![Page 31: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/31.jpg)
17.DefaultType directive
Syntax: DefaultType MIME-type
Default: DefaultType text/plain
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Status: core
![Page 32: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/32.jpg)
There will be times when the server is asked to provide a document whose type cannot be determined by its MIME types mappings.
The server must inform the client of the content-type of the document, so in the event of an unknown type it uses the DefaultType. For example:
DefaultType image/gif
![Page 33: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/33.jpg)
18.DirectoryMatch
<DirectoryMatch>
Syntax: <DirectoryMatch regex> ... </DirectoryMatch>
Context: server config, virtual host
Status: Core.
Compatibility: Available in Apache 1.3 and late
![Page 34: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/34.jpg)
<DirectoryMatch> and </DirectoryMatch> are used to enclose a group of directives which will apply only to the named directory and sub-directories of that directory, the same as <Directory>. However, it takes as an argument a regular expression.
For example:
<DirectoryMatch "^/www/.*/[0-9]{3}">
![Page 35: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/35.jpg)
19.DocumentRoot directive
DocumentRoot directive
Syntax: DocumentRoot directory-path
Default: DocumentRoot /usr/local/apache/htdocs
Context: server config, virtual host
Status: core
This directive sets the directory from which httpd will serve files.
![Page 36: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/36.jpg)
Unless matched by a directive like Alias, the server appends the path from the requested URL to the document root to make the path to the document.
Example:
DocumentRoot /usr/web
then an access to http://www.my.host.com/index.html refers to /usr/web/index.html.
![Page 37: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/37.jpg)
20.EBCDICConvert
Syntax: EBCDICConvert On|Off[=direction] extension [extension] ...
Context: server config, virtual host, directory, .htaccess
Status: core
Override: FileInfo
Compatibility: The configurable EBCDIC conversion is only available in Apache 1.3.19 and later.
![Page 38: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/38.jpg)
The EBCDICConvert directive maps the given filename extensions to the specified conversion setting (On or Off). File extensions may be specified with or without a leading dot
![Page 39: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/39.jpg)
21.EnableExceptionHook directive
Syntax: EnableExceptionHook on|off
Default: EnableExceptionHook off
Context: server config
Status: core
Compatibility: EnableExceptionHook is available in Apache 1.3.30 and later
EnableExceptionHook controls whether or not an exception hook implemented by a module will be called after a child process crash.
![Page 40: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/40.jpg)
22.<Files> directive
Syntax: <Files filename> ... </Files>
Context: server config, virtual host, .htaccess
Status: core
Compatibility: only available in Apache 1.2 and above
The <Files> directive provides for access control by filename.
![Page 41: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/41.jpg)
23.<FilesMatch>
Syntax: <FilesMatch regex> ... </FilesMatch>
Context: server config, virtual host, .htaccess
Status: core
Compatibility: only available in Apache 1.3 and above.
The <FilesMatch> directive provides for access control by filename, just as the <Files> directive does. However, it accepts a regular expression. For example:
<FilesMatch "\.(gif|jpe?g|png)$">
would match most common Internet graphics formats.
![Page 42: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/42.jpg)
The <FilesMatch> directive provides for access control by filename, just as the <Files> directive does. However, it accepts a regular expression. For example:
<FilesMatch "\.(gif|jpe?g|png)$">
would match most common Internet graphics formats.
![Page 43: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/43.jpg)
24.HostnameLookups directive
Syntax: HostnameLookups on|off|double
Default: HostnameLookups off
Context: server config, virtual host, directory
Status: core
Compatibility: double available only in Apache 1.3 and above.
Compatibility: Default was on prior to Apache 1.3.
![Page 44: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/44.jpg)
This directive enables DNS lookups so that host names can be logged (and passed to CGIs/SSIs in REMOTE_HOST).
At least one of the ip addresses in the forward lookup must match the original address. (In "tcpwrappers" terminology this is called PARANOID.)
![Page 45: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/45.jpg)
25.IdentityCheck directive
Syntax: IdentityCheck on|off
Default: IdentityCheck off
Context: server config, virtual host, directory
Status: core
This directive enables RFC1413-compliant logging of the remote user name for each connection, where the client machine runs identd or something similar. This information is logged in the access log.
![Page 46: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/46.jpg)
26.<IfDefine> directive
Syntax: <IfDefine [!]parameter-name> ... </IfDefine>
Default: None
Context: all
Status: Core
Compatibility: <IfDefine> is only available in 1.3.1 and later.
The <IfDefine test>...</IfDefine> section is used to mark directives that are conditional. The directives within an IfDefine section are only processed if the test is true. If test is false, everything between the start and end markers is ignored.
The test in the <IfDefine> section directive can be one of two forms:
* parameter-name
* !parameter-name
![Page 47: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/47.jpg)
The directives within an IfDefine section are only processed if the test is true. If test is false, everything between the start and end markers is ignored.
The test in the <IfDefine> section directive can be one of two forms:
* parameter-name
* !parameter-name
![Page 48: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/48.jpg)
27.<IfModule> directive
Syntax: <IfModule [!]module-name> ... </IfModule>
Default: None
Context: all
Status: Core
Compatibility: IfModule is only available in 1.2 and later.
![Page 49: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/49.jpg)
The <IfModule test>...</IfModule> section is used to mark directives that are conditional. The directives within an IfModule section are only processed if the test is true. If test is false, everything between the start and end markers is ignored.
The test in the <IfModule> section directive can be one of two forms:
* module name * !module name
![Page 50: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/50.jpg)
28.KeepAliveTimeout directiveSyntax: KeepAliveTimeout seconds
Default: KeepAliveTimeout 15
Context: server config
Status: Core
Compatibility: KeepAliveTimeout is only available in Apache 1.1 and later.
The number of seconds Apache will wait for a subsequent request before closing the connection.
![Page 51: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/51.jpg)
29.<Limit> directive
Syntax: <Limit method [method] ... > ... </Limit>
Context: any
Status: core
Access controls are normally effective for all access methods, and this is the usual desired behavior. In the general case, access control directives should not be placed within a <limit> section
![Page 52: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/52.jpg)
30.<LimitExcept> directive
<LimitExcept> directive
Syntax: <LimitExcept method [method] ... > ... </LimitExcept>
Context: any
Status: core
Compatibility: Available in Apache 1.3.5 and later
![Page 53: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/53.jpg)
<LimitExcept> and </LimitExcept> are used to enclose a group of access control directives which will then apply to any HTTP access method not listed in the arguments; i.e., it is the opposite of a <Limit> section and can be used to control both standard and nonstandard/unrecognized methods. See the documentation for <Limit> for more details.For example:
<LimitExcept POST GET>
Require valid-user
</LimitExcept>
![Page 54: Apache](https://reader035.vdocuments.mx/reader035/viewer/2022081602/556f6803d8b42a9d338b48d5/html5/thumbnails/54.jpg)
Thank youThank you