The software described in this documentation is either in Extended Support or Sustaining Support. See https://www.oracle.com/us/support/library/enterprise-linux-support-policies-069172.pdf for more information.
Oracle recommends that you upgrade the software described by this documentation as soon as possible.
Any changes that you make to the configuration of the Apache HTTP server do not take effect until you restart the server:
# service httpd restart
The main configuration file for the Apache HTTP server is
/etc/httpd/conf/httpd.conf. You can modify the
directives in this file to customize Apache for your environment.
The directives include:
-
Allow fromclient[client...] | all Specifies a list of clients that can access content or
allto serve content to any client. TheOrderdirective determines the order in whichhttpdevaluatesAllowandDenydirectives.-
Deny fromclient[client...] | all Specifies a list of clients that cannot access content or
allto disallow all clients. TheOrderdirective determines the order in whichhttpdevaluatesAllowandDenydirectives.-
DocumentRootdirectory-path The top level directory for Apache server content. The
apacheuser requires read access to any files and read and execute access to the directory and any of its sub-directories. Do not place a slash at the end of the directory path.For example:
DocumentRoot /var/www/html
-
ErrorLogfilename| syslog[:facility] If set to a file name, specifies the file, relative to
ServerRoot, to whichhttpdsends error messages.If set to
syslog, specifies thathttpdsend errors torsyslogd. Afacilityargument specifies thersyslogdfacility. The default facility islocal7.For example:
ErrorLog logs/error_log
-
Listen [IP_address:]port Accept incoming requests on the specified port or IP address and port combination. By default, the
httpdserver accepts requests on port 80 for all network interfaces. For a port number other than 80, HTTP requests to the server must include the port number.For example:
Listen 80 Listen 192.168.2.1:8080
-
LoadModulemodulepath The Apache HTTP server can load external modules (dynamic shared objects or DSOs) to extend its functionality. The
moduleargument is the name of the DSO, andfilenameis the path name of the module relative toServerRoot.For example:
LoadModule auth_basic_module modules/mod_auth_basic.so
-
Order deny,allow | allow,deny Specifies the order in which
httpdevaluates Allow and Deny directives.For example, permit access only to clients from the
mydom.comdomain:Order deny,allow Deny from all Allow from .mydom.com
The following directives would not permit access by any client:
Order allow,deny Deny from all Allow from .mydom.com
-
ServerNameFQDN[:port] Specifies the fully qualified domain name or IP address of the
httpdserver and an optional port on which the server listens. The FQDN must be resolvable to an IP address. If you do not specify a FQDN, the server performs a reverse-name lookup on the IP address. If you do not specify a port, the server uses the port corresponding to the incoming request.For example:
ServerName www.mydom.com:80
-
ServerRootdirectory-path The top of the directory hierarchy where the
httpdserver keeps its configuration, error, and log files. Do not place a slash at the end of the directory path.For example:
ServerRoot /etc/httpd
-
Timeoutseconds Specifies the number of seconds that
httpdwaits for network operations to finish before reporting a timeout error. The default value is 60 seconds.-
UserDirdirectory-path... | disabled [user...] | enableduser... If set to
disabled, disallows users identified by the space-separateduserargument to publish content from their home directories. If no users are specified, all users are disallowed.If set to
enabled, allows users identified by the space-separateduserargument to publish content from their home directories, provided that they are not specified as an argument todisabled.directory-pathis the name of a directory from whichhttpdpublishes content. A relative path is assumed to be relative to a user’s home directory. If you specify more than one directory path,httpdtries each alternative in turn until find a web page. Ifdirectory-pathis not defined, the default is~/public_html. Do not place a slash at the end of the directory path.For example:
UserDir disabled root guest UserDir enabled oracle alice UserDir www http://www.mydom.com/
The
rootandguestusers are disabled from content publishing. Assuming thatServerNameis set towww.mydom.com, browsinghttp://www.example.com/~alicedisplaysalice's web page, which must be located at~alice/wwworhttp://www.example.com/alice(that is, in the directoryalicerelative toServerRoot).NoteYou would usually change the settings in the
<IfModule mod_userdir.c>container to allow users to publish user content.
For more information, see http://httpd.apache.org/docs/current/mod/directives.html.

