软件包部署位置
    /app/apache/apache/bin

    1. cat >> /etc/profile << EOF
    2. export PATH=$PATH:/app/apache/apache/bin
    3. EOF
    4. source /etc/profile
    5. cp /app/apache/apache/bin/apachectl /etc/init.d/httpd
    6. /etc/init.d/httpd restart
    7. chkconfig httpd on

    yum部署默认配置文件

    1. [root@test-boccfc-web ~]# cat /etc/httpd/
    2. conf/ conf.modules.d/ modules/
    3. conf.d/ logs/ run/
    4. [root@test-boccfc-web ~]# cat /etc/httpd/conf/httpd.conf
    5. #
    6. # This is the main Apache HTTP server configuration file. It contains the
    7. # configuration directives that give the server its instructions.
    8. # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
    9. # In particular, see
    10. # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
    11. # for a discussion of each configuration directive.
    12. #
    13. # Do NOT simply read the instructions in here without understanding
    14. # what they do. They're here only as hints or reminders. If you are unsure
    15. # consult the online docs. You have been warned.
    16. #
    17. # Configuration and logfile names: If the filenames you specify for many
    18. # of the server's control files begin with "/" (or "drive:/" for Win32), the
    19. # server will use that explicit path. If the filenames do *not* begin
    20. # with "/", the value of ServerRoot is prepended -- so 'log/access_log'
    21. # with ServerRoot set to '/www' will be interpreted by the
    22. # server as '/www/log/access_log', where as '/log/access_log' will be
    23. # interpreted as '/log/access_log'.
    24. #
    25. # ServerRoot: The top of the directory tree under which the server's
    26. # configuration, error, and log files are kept.
    27. #
    28. # Do not add a slash at the end of the directory path. If you point
    29. # ServerRoot at a non-local disk, be sure to specify a local disk on the
    30. # Mutex directive, if file-based mutexes are used. If you wish to share the
    31. # same ServerRoot for multiple httpd daemons, you will need to change at
    32. # least PidFile.
    33. #
    34. ServerRoot "/etc/httpd"
    35. #
    36. # Listen: Allows you to bind Apache to specific IP addresses and/or
    37. # ports, instead of the default. See also the <VirtualHost>
    38. # directive.
    39. #
    40. # Change this to Listen on specific IP addresses as shown below to
    41. # prevent Apache from glomming onto all bound IP addresses.
    42. #
    43. #Listen 12.34.56.78:80
    44. Listen 80
    45. #
    46. # Dynamic Shared Object (DSO) Support
    47. #
    48. # To be able to use the functionality of a module which was built as a DSO you
    49. # have to place corresponding `LoadModule' lines at this location so the
    50. # directives contained in it are actually available _before_ they are used.
    51. # Statically compiled modules (those listed by `httpd -l') do not need
    52. # to be loaded here.
    53. #
    54. # Example:
    55. # LoadModule foo_module modules/mod_foo.so
    56. #
    57. Include conf.modules.d/*.conf
    58. #
    59. # If you wish httpd to run as a different user or group, you must run
    60. # httpd as root initially and it will switch.
    61. #
    62. # User/Group: The name (or #number) of the user/group to run httpd as.
    63. # It is usually good practice to create a dedicated user and group for
    64. # running httpd, as with most system services.
    65. #
    66. User apache
    67. Group apache
    68. # 'Main' server configuration
    69. #
    70. # The directives in this section set up the values used by the 'main'
    71. # server, which responds to any requests that aren't handled by a
    72. # <VirtualHost> definition. These values also provide defaults for
    73. # any <VirtualHost> containers you may define later in the file.
    74. #
    75. # All of these directives may appear inside <VirtualHost> containers,
    76. # in which case these default settings will be overridden for the
    77. # virtual host being defined.
    78. #
    79. #
    80. # ServerAdmin: Your address, where problems with the server should be
    81. # e-mailed. This address appears on some server-generated pages, such
    82. # as error documents. e.g. admin@your-domain.com
    83. #
    84. ServerAdmin root@localhost
    85. #
    86. # ServerName gives the name and port that the server uses to identify itself.
    87. # This can often be determined automatically, but we recommend you specify
    88. # it explicitly to prevent problems during startup.
    89. #
    90. # If your host doesn't have a registered DNS name, enter its IP address here.
    91. #
    92. #ServerName www.example.com:80
    93. #
    94. # Deny access to the entirety of your server's filesystem. You must
    95. # explicitly permit access to web content directories in other
    96. # <Directory> blocks below.
    97. #
    98. <Directory />
    99. AllowOverride none
    100. Require all denied
    101. </Directory>
    102. #
    103. # Note that from this point forward you must specifically allow
    104. # particular features to be enabled - so if something's not working as
    105. # you might expect, make sure that you have specifically enabled it
    106. # below.
    107. #
    108. #
    109. # DocumentRoot: The directory out of which you will serve your
    110. # documents. By default, all requests are taken from this directory, but
    111. # symbolic links and aliases may be used to point to other locations.
    112. #
    113. DocumentRoot "/var/www/html"
    114. #
    115. # Relax access to content within /var/www.
    116. #
    117. <Directory "/var/www">
    118. AllowOverride None
    119. # Allow open access:
    120. Require all granted
    121. </Directory>
    122. # Further relax access to the default document root:
    123. <Directory "/var/www/html">
    124. #
    125. # Possible values for the Options directive are "None", "All",
    126. # or any combination of:
    127. # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    128. #
    129. # Note that "MultiViews" must be named *explicitly* --- "Options All"
    130. # doesn't give it to you.
    131. #
    132. # The Options directive is both complicated and important. Please see
    133. # http://httpd.apache.org/docs/2.4/mod/core.html#options
    134. # for more information.
    135. #
    136. Options Indexes FollowSymLinks
    137. #
    138. # AllowOverride controls what directives may be placed in .htaccess files.
    139. # It can be "All", "None", or any combination of the keywords:
    140. # Options FileInfo AuthConfig Limit
    141. #
    142. AllowOverride None
    143. #
    144. # Controls who can get stuff from this server.
    145. #
    146. Require all granted
    147. </Directory>
    148. #
    149. # DirectoryIndex: sets the file that Apache will serve if a directory
    150. # is requested.
    151. #
    152. <IfModule dir_module>
    153. DirectoryIndex index.html
    154. </IfModule>
    155. #
    156. # The following lines prevent .htaccess and .htpasswd files from being
    157. # viewed by Web clients.
    158. #
    159. <Files ".ht*">
    160. Require all denied
    161. </Files>
    162. #
    163. # ErrorLog: The location of the error log file.
    164. # If you do not specify an ErrorLog directive within a <VirtualHost>
    165. # container, error messages relating to that virtual host will be
    166. # logged here. If you *do* define an error logfile for a <VirtualHost>
    167. # container, that host's errors will be logged there and not here.
    168. #
    169. ErrorLog "logs/error_log"
    170. #
    171. # LogLevel: Control the number of messages logged to the error_log.
    172. # Possible values include: debug, info, notice, warn, error, crit,
    173. # alert, emerg.
    174. #
    175. LogLevel warn
    176. <IfModule log_config_module>
    177. #
    178. # The following directives define some format nicknames for use with
    179. # a CustomLog directive (see below).
    180. #
    181. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    182. LogFormat "%h %l %u %t \"%r\" %>s %b" common
    183. <IfModule logio_module>
    184. # You need to enable mod_logio.c to use %I and %O
    185. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    186. </IfModule>
    187. #
    188. # The location and format of the access logfile (Common Logfile Format).
    189. # If you do not define any access logfiles within a <VirtualHost>
    190. # container, they will be logged here. Contrariwise, if you *do*
    191. # define per-<VirtualHost> access logfiles, transactions will be
    192. # logged therein and *not* in this file.
    193. #
    194. #CustomLog "logs/access_log" common
    195. #
    196. # If you prefer a logfile with access, agent, and referer information
    197. # (Combined Logfile Format) you can use the following directive.
    198. #
    199. CustomLog "logs/access_log" combined
    200. </IfModule>
    201. <IfModule alias_module>
    202. #
    203. # Redirect: Allows you to tell clients about documents that used to
    204. # exist in your server's namespace, but do not anymore. The client
    205. # will make a new request for the document at its new location.
    206. # Example:
    207. # Redirect permanent /foo http://www.example.com/bar
    208. #
    209. # Alias: Maps web paths into filesystem paths and is used to
    210. # access content that does not live under the DocumentRoot.
    211. # Example:
    212. # Alias /webpath /full/filesystem/path
    213. #
    214. # If you include a trailing / on /webpath then the server will
    215. # require it to be present in the URL. You will also likely
    216. # need to provide a <Directory> section to allow access to
    217. # the filesystem path.
    218. #
    219. # ScriptAlias: This controls which directories contain server scripts.
    220. # ScriptAliases are essentially the same as Aliases, except that
    221. # documents in the target directory are treated as applications and
    222. # run by the server when requested rather than as documents sent to the
    223. # client. The same rules about trailing "/" apply to ScriptAlias
    224. # directives as to Alias.
    225. #
    226. ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
    227. </IfModule>
    228. #
    229. # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
    230. # CGI directory exists, if you have that configured.
    231. #
    232. <Directory "/var/www/cgi-bin">
    233. AllowOverride None
    234. Options None
    235. Require all granted
    236. </Directory>
    237. <IfModule mime_module>
    238. #
    239. # TypesConfig points to the file containing the list of mappings from
    240. # filename extension to MIME-type.
    241. #
    242. TypesConfig /etc/mime.types
    243. #
    244. # AddType allows you to add to or override the MIME configuration
    245. # file specified in TypesConfig for specific file types.
    246. #
    247. #AddType application/x-gzip .tgz
    248. #
    249. # AddEncoding allows you to have certain browsers uncompress
    250. # information on the fly. Note: Not all browsers support this.
    251. #
    252. #AddEncoding x-compress .Z
    253. #AddEncoding x-gzip .gz .tgz
    254. #
    255. # If the AddEncoding directives above are commented-out, then you
    256. # probably should define those extensions to indicate media types:
    257. #
    258. AddType application/x-compress .Z
    259. AddType application/x-gzip .gz .tgz
    260. #
    261. # AddHandler allows you to map certain file extensions to "handlers":
    262. # actions unrelated to filetype. These can be either built into the server
    263. # or added with the Action directive (see below)
    264. #
    265. # To use CGI scripts outside of ScriptAliased directories:
    266. # (You will also need to add "ExecCGI" to the "Options" directive.)
    267. #
    268. #AddHandler cgi-script .cgi
    269. # For type maps (negotiated resources):
    270. #AddHandler type-map var
    271. #
    272. # Filters allow you to process content before it is sent to the client.
    273. #
    274. # To parse .shtml files for server-side includes (SSI):
    275. # (You will also need to add "Includes" to the "Options" directive.)
    276. #
    277. AddType text/html .shtml
    278. AddOutputFilter INCLUDES .shtml
    279. </IfModule>
    280. #
    281. # Specify a default charset for all content served; this enables
    282. # interpretation of all content as UTF-8 by default. To use the
    283. # default browser choice (ISO-8859-1), or to allow the META tags
    284. # in HTML content to override this choice, comment out this
    285. # directive:
    286. #
    287. AddDefaultCharset UTF-8
    288. <IfModule mime_magic_module>
    289. #
    290. # The mod_mime_magic module allows the server to use various hints from the
    291. # contents of the file itself to determine its type. The MIMEMagicFile
    292. # directive tells the module where the hint definitions are located.
    293. #
    294. MIMEMagicFile conf/magic
    295. </IfModule>
    296. #
    297. # Customizable error responses come in three flavors:
    298. # 1) plain text 2) local redirects 3) external redirects
    299. #
    300. # Some examples:
    301. #ErrorDocument 500 "The server made a boo boo."
    302. #ErrorDocument 404 /missing.html
    303. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    304. #ErrorDocument 402 http://www.example.com/subscription_info.html
    305. #
    306. #
    307. # EnableMMAP and EnableSendfile: On systems that support it,
    308. # memory-mapping or the sendfile syscall may be used to deliver
    309. # files. This usually improves server performance, but must
    310. # be turned off when serving from networked-mounted
    311. # filesystems or if support for these functions is otherwise
    312. # broken on your system.
    313. # Defaults if commented: EnableMMAP On, EnableSendfile Off
    314. #
    315. #EnableMMAP off
    316. EnableSendfile on
    317. # Supplemental configuration
    318. #
    319. # Load config files in the "/etc/httpd/conf.d" directory, if any.
    320. IncludeOptional conf.d/*.conf
    321. [root@test-boccfc-web ~]#

    自定义配置文件:

    1. [root@test-boccfc-web ~]# cat /etc/httpd/conf/httpd.conf
    2. #
    3. # This is the main Apache HTTP server configuration file. It contains the
    4. # configuration directives that give the server its instructions.
    5. # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
    6. # In particular, see
    7. # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
    8. # for a discussion of each configuration directive.
    9. #
    10. # Do NOT simply read the instructions in here without understanding
    11. # what they do. They're here only as hints or reminders. If you are unsure
    12. # consult the online docs. You have been warned.
    13. #
    14. # Configuration and logfile names: If the filenames you specify for many
    15. # of the server's control files begin with "/" (or "drive:/" for Win32), the
    16. # server will use that explicit path. If the filenames do *not* begin
    17. # with "/", the value of ServerRoot is prepended -- so 'log/access_log'
    18. # with ServerRoot set to '/www' will be interpreted by the
    19. # server as '/www/log/access_log', where as '/log/access_log' will be
    20. # interpreted as '/log/access_log'.
    21. #
    22. # ServerRoot: The top of the directory tree under which the server's
    23. # configuration, error, and log files are kept.
    24. #
    25. # Do not add a slash at the end of the directory path. If you point
    26. # ServerRoot at a non-local disk, be sure to specify a local disk on the
    27. # Mutex directive, if file-based mutexes are used. If you wish to share the
    28. # same ServerRoot for multiple httpd daemons, you will need to change at
    29. # least PidFile.
    30. #
    31. ServerRoot "/etc/httpd"
    32. #
    33. # Listen: Allows you to bind Apache to specific IP addresses and/or
    34. # ports, instead of the default. See also the <VirtualHost>
    35. # directive.
    36. #
    37. # Change this to Listen on specific IP addresses as shown below to
    38. # prevent Apache from glomming onto all bound IP addresses.
    39. #
    40. #Listen 12.34.56.78:80
    41. Listen 80
    42. #
    43. # Dynamic Shared Object (DSO) Support
    44. #
    45. # To be able to use the functionality of a module which was built as a DSO you
    46. # have to place corresponding `LoadModule' lines at this location so the
    47. # directives contained in it are actually available _before_ they are used.
    48. # Statically compiled modules (those listed by `httpd -l') do not need
    49. # to be loaded here.
    50. #
    51. # Example:
    52. # LoadModule foo_module modules/mod_foo.so
    53. #
    54. Include conf.modules.d/*.conf
    55. #
    56. # If you wish httpd to run as a different user or group, you must run
    57. # httpd as root initially and it will switch.
    58. #
    59. # User/Group: The name (or #number) of the user/group to run httpd as.
    60. # It is usually good practice to create a dedicated user and group for
    61. # running httpd, as with most system services.
    62. #
    63. User apache
    64. Group apache
    65. # 'Main' server configuration
    66. #
    67. # The directives in this section set up the values used by the 'main'
    68. # server, which responds to any requests that aren't handled by a
    69. # <VirtualHost> definition. These values also provide defaults for
    70. # any <VirtualHost> containers you may define later in the file.
    71. #
    72. # All of these directives may appear inside <VirtualHost> containers,
    73. # in which case these default settings will be overridden for the
    74. # virtual host being defined.
    75. #
    76. #
    77. # ServerAdmin: Your address, where problems with the server should be
    78. # e-mailed. This address appears on some server-generated pages, such
    79. # as error documents. e.g. admin@your-domain.com
    80. #
    81. ServerAdmin root@localhost
    82. #
    83. # ServerName gives the name and port that the server uses to identify itself.
    84. # This can often be determined automatically, but we recommend you specify
    85. # it explicitly to prevent problems during startup.
    86. #
    87. # If your host doesn't have a registered DNS name, enter its IP address here.
    88. #
    89. #ServerName www.example.com:80
    90. #
    91. # Deny access to the entirety of your server's filesystem. You must
    92. # explicitly permit access to web content directories in other
    93. # <Directory> blocks below.
    94. #
    95. <Directory />
    96. AllowOverride none
    97. Require all denied
    98. </Directory>
    99. #
    100. # Note that from this point forward you must specifically allow
    101. # particular features to be enabled - so if something's not working as
    102. # you might expect, make sure that you have specifically enabled it
    103. # below.
    104. #
    105. #
    106. # DocumentRoot: The directory out of which you will serve your
    107. # documents. By default, all requests are taken from this directory, but
    108. # symbolic links and aliases may be used to point to other locations.
    109. #
    110. DocumentRoot "/var/www/html"
    111. #
    112. # Relax access to content within /var/www.
    113. #
    114. <Directory "/var/www">
    115. AllowOverride None
    116. # Allow open access:
    117. Require all granted
    118. </Directory>
    119. # Further relax access to the default document root:
    120. <Directory "/var/www/html">
    121. #
    122. # Possible values for the Options directive are "None", "All",
    123. # or any combination of:
    124. # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    125. #
    126. # Note that "MultiViews" must be named *explicitly* --- "Options All"
    127. # doesn't give it to you.
    128. #
    129. # The Options directive is both complicated and important. Please see
    130. # http://httpd.apache.org/docs/2.4/mod/core.html#options
    131. # for more information.
    132. #
    133. Options Indexes FollowSymLinks
    134. #
    135. # AllowOverride controls what directives may be placed in .htaccess files.
    136. # It can be "All", "None", or any combination of the keywords:
    137. # Options FileInfo AuthConfig Limit
    138. #
    139. AllowOverride None
    140. #
    141. # Controls who can get stuff from this server.
    142. #
    143. Require all granted
    144. </Directory>
    145. #
    146. # DirectoryIndex: sets the file that Apache will serve if a directory
    147. # is requested.
    148. #
    149. <IfModule dir_module>
    150. DirectoryIndex index.html
    151. </IfModule>
    152. #
    153. # The following lines prevent .htaccess and .htpasswd files from being
    154. # viewed by Web clients.
    155. #
    156. <Files ".ht*">
    157. Require all denied
    158. </Files>
    159. #
    160. # ErrorLog: The location of the error log file.
    161. # If you do not specify an ErrorLog directive within a <VirtualHost>
    162. # container, error messages relating to that virtual host will be
    163. # logged here. If you *do* define an error logfile for a <VirtualHost>
    164. # container, that host's errors will be logged there and not here.
    165. #
    166. ErrorLog "logs/error_log"
    167. #
    168. # LogLevel: Control the number of messages logged to the error_log.
    169. # Possible values include: debug, info, notice, warn, error, crit,
    170. # alert, emerg.
    171. #
    172. LogLevel warn
    173. <IfModule log_config_module>
    174. #
    175. # The following directives define some format nicknames for use with
    176. # a CustomLog directive (see below).
    177. #
    178. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    179. LogFormat "%h %l %u %t \"%r\" %>s %b" common
    180. <IfModule logio_module>
    181. # You need to enable mod_logio.c to use %I and %O
    182. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    183. </IfModule>
    184. #
    185. # The location and format of the access logfile (Common Logfile Format).
    186. # If you do not define any access logfiles within a <VirtualHost>
    187. # container, they will be logged here. Contrariwise, if you *do*
    188. # define per-<VirtualHost> access logfiles, transactions will be
    189. # logged therein and *not* in this file.
    190. #
    191. #CustomLog "logs/access_log" common
    192. #
    193. # If you prefer a logfile with access, agent, and referer information
    194. # (Combined Logfile Format) you can use the following directive.
    195. #
    196. CustomLog "logs/access_log" combined
    197. </IfModule>
    198. <IfModule alias_module>
    199. #
    200. # Redirect: Allows you to tell clients about documents that used to
    201. # exist in your server's namespace, but do not anymore. The client
    202. # will make a new request for the document at its new location.
    203. # Example:
    204. # Redirect permanent /foo http://www.example.com/bar
    205. #
    206. # Alias: Maps web paths into filesystem paths and is used to
    207. # access content that does not live under the DocumentRoot.
    208. # Example:
    209. # Alias /webpath /full/filesystem/path
    210. #
    211. # If you include a trailing / on /webpath then the server will
    212. # require it to be present in the URL. You will also likely
    213. # need to provide a <Directory> section to allow access to
    214. # the filesystem path.
    215. #
    216. # ScriptAlias: This controls which directories contain server scripts.
    217. # ScriptAliases are essentially the same as Aliases, except that
    218. # documents in the target directory are treated as applications and
    219. # run by the server when requested rather than as documents sent to the
    220. # client. The same rules about trailing "/" apply to ScriptAlias
    221. # directives as to Alias.
    222. #
    223. ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
    224. </IfModule>
    225. #
    226. # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
    227. # CGI directory exists, if you have that configured.
    228. #
    229. <Directory "/var/www/cgi-bin">
    230. AllowOverride None
    231. Options None
    232. Require all granted
    233. </Directory>
    234. <IfModule mime_module>
    235. #
    236. # TypesConfig points to the file containing the list of mappings from
    237. # filename extension to MIME-type.
    238. #
    239. TypesConfig /etc/mime.types
    240. #
    241. # AddType allows you to add to or override the MIME configuration
    242. # file specified in TypesConfig for specific file types.
    243. #
    244. #AddType application/x-gzip .tgz
    245. #
    246. # AddEncoding allows you to have certain browsers uncompress
    247. # information on the fly. Note: Not all browsers support this.
    248. #
    249. #AddEncoding x-compress .Z
    250. #AddEncoding x-gzip .gz .tgz
    251. #
    252. # If the AddEncoding directives above are commented-out, then you
    253. # probably should define those extensions to indicate media types:
    254. #
    255. AddType application/x-compress .Z
    256. AddType application/x-gzip .gz .tgz
    257. #
    258. # AddHandler allows you to map certain file extensions to "handlers":
    259. # actions unrelated to filetype. These can be either built into the server
    260. # or added with the Action directive (see below)
    261. #
    262. # To use CGI scripts outside of ScriptAliased directories:
    263. # (You will also need to add "ExecCGI" to the "Options" directive.)
    264. #
    265. #AddHandler cgi-script .cgi
    266. # For type maps (negotiated resources):
    267. #AddHandler type-map var
    268. #
    269. # Filters allow you to process content before it is sent to the client.
    270. #
    271. # To parse .shtml files for server-side includes (SSI):
    272. # (You will also need to add "Includes" to the "Options" directive.)
    273. #
    274. AddType text/html .shtml
    275. AddOutputFilter INCLUDES .shtml
    276. </IfModule>
    277. #
    278. # Specify a default charset for all content served; this enables
    279. # interpretation of all content as UTF-8 by default. To use the
    280. # default browser choice (ISO-8859-1), or to allow the META tags
    281. # in HTML content to override this choice, comment out this
    282. # directive:
    283. #
    284. AddDefaultCharset UTF-8
    285. <IfModule mime_magic_module>
    286. #
    287. # The mod_mime_magic module allows the server to use various hints from the
    288. # contents of the file itself to determine its type. The MIMEMagicFile
    289. # directive tells the module where the hint definitions are located.
    290. #
    291. MIMEMagicFile conf/magic
    292. </IfModule>
    293. #
    294. # Customizable error responses come in three flavors:
    295. # 1) plain text 2) local redirects 3) external redirects
    296. #
    297. # Some examples:
    298. #ErrorDocument 500 "The server made a boo boo."
    299. #ErrorDocument 404 /missing.html
    300. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    301. #ErrorDocument 402 http://www.example.com/subscription_info.html
    302. #
    303. #
    304. # EnableMMAP and EnableSendfile: On systems that support it,
    305. # memory-mapping or the sendfile syscall may be used to deliver
    306. # files. This usually improves server performance, but must
    307. # be turned off when serving from networked-mounted
    308. # filesystems or if support for these functions is otherwise
    309. # broken on your system.
    310. # Defaults if commented: EnableMMAP On, EnableSendfile Off
    311. #
    312. #EnableMMAP off
    313. EnableSendfile on
    314. # Supplemental configuration
    315. #
    316. # Load config files in the "/etc/httpd/conf.d" directory, if any.
    317. IncludeOptional conf.d/*.conf
    318. [root@test-boccfc-web ~]#
    319. [root@test-boccfc-web ~]# cat /app/apache/apache/conf/httpd.conf
    320. #
    321. # This is the main Apache HTTP server configuration file. It contains the
    322. # configuration directives that give the server its instructions.
    323. # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
    324. # In particular, see
    325. # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
    326. # for a discussion of each configuration directive.
    327. #
    328. # Do NOT simply read the instructions in here without understanding
    329. # what they do. They're here only as hints or reminders. If you are unsure
    330. # consult the online docs. You have been warned.
    331. #
    332. # Configuration and logfile names: If the filenames you specify for many
    333. # of the server's control files begin with "/" (or "drive:/" for Win32), the
    334. # server will use that explicit path. If the filenames do *not* begin
    335. # with "/", the value of ServerRoot is prepended -- so "logs/access_log"
    336. # with ServerRoot set to "/usr/local/apache2" will be interpreted by the
    337. # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
    338. # will be interpreted as '/logs/access_log'.
    339. #
    340. # ServerRoot: The top of the directory tree under which the server's
    341. # configuration, error, and log files are kept.
    342. #
    343. # Do not add a slash at the end of the directory path. If you point
    344. # ServerRoot at a non-local disk, be sure to specify a local disk on the
    345. # Mutex directive, if file-based mutexes are used. If you wish to share the
    346. # same ServerRoot for multiple httpd daemons, you will need to change at
    347. # least PidFile.
    348. #
    349. ServerRoot "/app/apache/apache"
    350. #
    351. # Mutex: Allows you to set the mutex mechanism and mutex file directory
    352. # for individual mutexes, or change the global defaults
    353. #
    354. # Uncomment and change the directory if mutexes are file-based and the default
    355. # mutex file directory is not on a local disk or is not appropriate for some
    356. # other reason.
    357. #
    358. # Mutex default:logs
    359. #
    360. # Listen: Allows you to bind Apache to specific IP addresses and/or
    361. # ports, instead of the default. See also the <VirtualHost>
    362. # directive.
    363. #
    364. # Change this to Listen on specific IP addresses as shown below to
    365. # prevent Apache from glomming onto all bound IP addresses.
    366. #
    367. #Listen 12.34.56.78:80
    368. Listen 80
    369. #
    370. # Dynamic Shared Object (DSO) Support
    371. #
    372. # To be able to use the functionality of a module which was built as a DSO you
    373. # have to place corresponding `LoadModule' lines at this location so the
    374. # directives contained in it are actually available _before_ they are used.
    375. # Statically compiled modules (those listed by `httpd -l') do not need
    376. # to be loaded here.
    377. #
    378. # Example:
    379. # LoadModule foo_module modules/mod_foo.so
    380. #
    381. LoadModule authn_file_module modules/mod_authn_file.so
    382. #LoadModule authn_dbm_module modules/mod_authn_dbm.so
    383. #LoadModule authn_anon_module modules/mod_authn_anon.so
    384. #LoadModule authn_dbd_module modules/mod_authn_dbd.so
    385. #LoadModule authn_socache_module modules/mod_authn_socache.so
    386. LoadModule authn_core_module modules/mod_authn_core.so
    387. LoadModule authz_host_module modules/mod_authz_host.so
    388. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
    389. LoadModule authz_user_module modules/mod_authz_user.so
    390. #LoadModule authz_dbm_module modules/mod_authz_dbm.so
    391. #LoadModule authz_owner_module modules/mod_authz_owner.so
    392. #LoadModule authz_dbd_module modules/mod_authz_dbd.so
    393. LoadModule authz_core_module modules/mod_authz_core.so
    394. LoadModule access_compat_module modules/mod_access_compat.so
    395. LoadModule auth_basic_module modules/mod_auth_basic.so
    396. #LoadModule auth_form_module modules/mod_auth_form.so
    397. #LoadModule auth_digest_module modules/mod_auth_digest.so
    398. #LoadModule allowmethods_module modules/mod_allowmethods.so
    399. #LoadModule file_cache_module modules/mod_file_cache.so
    400. #LoadModule cache_module modules/mod_cache.so
    401. #LoadModule cache_disk_module modules/mod_cache_disk.so
    402. #LoadModule cache_socache_module modules/mod_cache_socache.so
    403. #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
    404. #LoadModule socache_dbm_module modules/mod_socache_dbm.so
    405. #LoadModule socache_memcache_module modules/mod_socache_memcache.so
    406. #LoadModule watchdog_module modules/mod_watchdog.so
    407. #LoadModule macro_module modules/mod_macro.so
    408. #LoadModule dbd_module modules/mod_dbd.so
    409. #LoadModule dumpio_module modules/mod_dumpio.so
    410. #LoadModule buffer_module modules/mod_buffer.so
    411. #LoadModule ratelimit_module modules/mod_ratelimit.so
    412. LoadModule reqtimeout_module modules/mod_reqtimeout.so
    413. #LoadModule ext_filter_module modules/mod_ext_filter.so
    414. #LoadModule request_module modules/mod_request.so
    415. #LoadModule include_module modules/mod_include.so
    416. LoadModule filter_module modules/mod_filter.so
    417. #LoadModule substitute_module modules/mod_substitute.so
    418. #LoadModule sed_module modules/mod_sed.so
    419. LoadModule mime_module modules/mod_mime.so
    420. LoadModule log_config_module modules/mod_log_config.so
    421. #LoadModule log_debug_module modules/mod_log_debug.so
    422. #LoadModule logio_module modules/mod_logio.so
    423. LoadModule env_module modules/mod_env.so
    424. #LoadModule expires_module modules/mod_expires.so
    425. LoadModule headers_module modules/mod_headers.so
    426. #LoadModule unique_id_module modules/mod_unique_id.so
    427. LoadModule setenvif_module modules/mod_setenvif.so
    428. LoadModule version_module modules/mod_version.so
    429. #LoadModule remoteip_module modules/mod_remoteip.so
    430. LoadModule proxy_module modules/mod_proxy.so
    431. LoadModule proxy_connect_module modules/mod_proxy_connect.so
    432. LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
    433. LoadModule proxy_http_module modules/mod_proxy_http.so
    434. #LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
    435. #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
    436. #LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
    437. #LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
    438. #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
    439. #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
    440. #LoadModule proxy_express_module modules/mod_proxy_express.so
    441. #LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
    442. #LoadModule session_module modules/mod_session.so
    443. #LoadModule session_cookie_module modules/mod_session_cookie.so
    444. #LoadModule session_dbd_module modules/mod_session_dbd.so
    445. #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
    446. #LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
    447. #LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
    448. #LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
    449. #LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
    450. LoadModule unixd_module modules/mod_unixd.so
    451. #LoadModule dav_module modules/mod_dav.so
    452. LoadModule status_module modules/mod_status.so
    453. LoadModule autoindex_module modules/mod_autoindex.so
    454. #LoadModule info_module modules/mod_info.so
    455. #LoadModule cgid_module modules/mod_cgid.so
    456. #LoadModule dav_fs_module modules/mod_dav_fs.so
    457. #LoadModule vhost_alias_module modules/mod_vhost_alias.so
    458. #LoadModule negotiation_module modules/mod_negotiation.so
    459. LoadModule dir_module modules/mod_dir.so
    460. #LoadModule actions_module modules/mod_actions.so
    461. #LoadModule speling_module modules/mod_speling.so
    462. #LoadModule userdir_module modules/mod_userdir.so
    463. LoadModule alias_module modules/mod_alias.so
    464. #LoadModule rewrite_module modules/mod_rewrite.so
    465. <IfModule unixd_module>
    466. #
    467. # If you wish httpd to run as a different user or group, you must run
    468. # httpd as root initially and it will switch.
    469. #
    470. # User/Group: The name (or #number) of the user/group to run httpd as.
    471. # It is usually good practice to create a dedicated user and group for
    472. # running httpd, as with most system services.
    473. #
    474. User apache
    475. Group apache
    476. </IfModule>
    477. # 'Main' server configuration
    478. #
    479. # The directives in this section set up the values used by the 'main'
    480. # server, which responds to any requests that aren't handled by a
    481. # <VirtualHost> definition. These values also provide defaults for
    482. # any <VirtualHost> containers you may define later in the file.
    483. #
    484. # All of these directives may appear inside <VirtualHost> containers,
    485. # in which case these default settings will be overridden for the
    486. # virtual host being defined.
    487. #
    488. #
    489. # ServerAdmin: Your address, where problems with the server should be
    490. # e-mailed. This address appears on some server-generated pages, such
    491. # as error documents. e.g. admin@your-domain.com
    492. #
    493. ServerAdmin you@example.com
    494. #
    495. # ServerName gives the name and port that the server uses to identify itself.
    496. # This can often be determined automatically, but we recommend you specify
    497. # it explicitly to prevent problems during startup.
    498. #
    499. # If your host doesn't have a registered DNS name, enter its IP address here.
    500. #
    501. #ServerName www.example.com:80
    502. #
    503. # Deny access to the entirety of your server's filesystem. You must
    504. # explicitly permit access to web content directories in other
    505. # <Directory> blocks below.
    506. #
    507. <Directory />
    508. AllowOverride none
    509. Require all denied
    510. </Directory>
    511. #
    512. # Note that from this point forward you must specifically allow
    513. # particular features to be enabled - so if something's not working as
    514. # you might expect, make sure that you have specifically enabled it
    515. # below.
    516. #
    517. #
    518. # DocumentRoot: The directory out of which you will serve your
    519. # documents. By default, all requests are taken from this directory, but
    520. # symbolic links and aliases may be used to point to other locations.
    521. #
    522. DocumentRoot "/app/apache/apache/htdocs"
    523. <Directory "/app/apache/apache/htdocs">
    524. #
    525. # Possible values for the Options directive are "None", "All",
    526. # or any combination of:
    527. # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    528. #
    529. # Note that "MultiViews" must be named *explicitly* --- "Options All"
    530. # doesn't give it to you.
    531. #
    532. # The Options directive is both complicated and important. Please see
    533. # http://httpd.apache.org/docs/2.4/mod/core.html#options
    534. # for more information.
    535. #
    536. Options FollowSymLinks
    537. #
    538. # AllowOverride controls what directives may be placed in .htaccess files.
    539. # It can be "All", "None", or any combination of the keywords:
    540. # AllowOverride FileInfo AuthConfig Limit
    541. #
    542. AllowOverride None
    543. #
    544. # Controls who can get stuff from this server.
    545. #
    546. Require all granted
    547. </Directory>
    548. #
    549. # DirectoryIndex: sets the file that Apache will serve if a directory
    550. # is requested.
    551. #
    552. <IfModule dir_module>
    553. DirectoryIndex index.html
    554. </IfModule>
    555. #
    556. # The following lines prevent .htaccess and .htpasswd files from being
    557. # viewed by Web clients.
    558. #
    559. <Files ".ht*">
    560. Require all denied
    561. </Files>
    562. #
    563. # ErrorLog: The location of the error log file.
    564. # If you do not specify an ErrorLog directive within a <VirtualHost>
    565. # container, error messages relating to that virtual host will be
    566. # logged here. If you *do* define an error logfile for a <VirtualHost>
    567. # container, that host's errors will be logged there and not here.
    568. #
    569. ErrorLog "/applog/apache/logs/error_log"
    570. #
    571. # LogLevel: Control the number of messages logged to the error_log.
    572. # Possible values include: debug, info, notice, warn, error, crit,
    573. # alert, emerg.
    574. #
    575. LogLevel warn
    576. <IfModule log_config_module>
    577. #
    578. # The following directives define some format nicknames for use with
    579. # a CustomLog directive (see below).
    580. #
    581. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    582. LogFormat "%h %l %u %t \"%r\" %>s %b" common
    583. <IfModule logio_module>
    584. # You need to enable mod_logio.c to use %I and %O
    585. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    586. </IfModule>
    587. #
    588. # The location and format of the access logfile (Common Logfile Format).
    589. # If you do not define any access logfiles within a <VirtualHost>
    590. # container, they will be logged here. Contrariwise, if you *do*
    591. # define per-<VirtualHost> access logfiles, transactions will be
    592. # logged therein and *not* in this file.
    593. #
    594. CustomLog "/applog/apache/logs/access_log" common
    595. #
    596. # If you prefer a logfile with access, agent, and referer information
    597. # (Combined Logfile Format) you can use the following directive.
    598. #
    599. #CustomLog "logs/access_log" combined
    600. </IfModule>
    601. <IfModule alias_module>
    602. #
    603. # Redirect: Allows you to tell clients about documents that used to
    604. # exist in your server's namespace, but do not anymore. The client
    605. # will make a new request for the document at its new location.
    606. # Example:
    607. # Redirect permanent /foo http://www.example.com/bar
    608. #
    609. # Alias: Maps web paths into filesystem paths and is used to
    610. # access content that does not live under the DocumentRoot.
    611. # Example:
    612. # Alias /webpath /full/filesystem/path
    613. #
    614. # If you include a trailing / on /webpath then the server will
    615. # require it to be present in the URL. You will also likely
    616. # need to provide a <Directory> section to allow access to
    617. # the filesystem path.
    618. #
    619. # ScriptAlias: This controls which directories contain server scripts.
    620. # ScriptAliases are essentially the same as Aliases, except that
    621. # documents in the target directory are treated as applications and
    622. # run by the server when requested rather than as documents sent to the
    623. # client. The same rules about trailing "/" apply to ScriptAlias
    624. # directives as to Alias.
    625. #
    626. ScriptAlias /cgi-bin/ "/app/apache/apache/cgi-bin/"
    627. </IfModule>
    628. <IfModule cgid_module>
    629. #
    630. # ScriptSock: On threaded servers, designate the path to the UNIX
    631. # socket used to communicate with the CGI daemon of mod_cgid.
    632. #
    633. #Scriptsock cgisock
    634. </IfModule>
    635. #
    636. # "/app/apache/apache/cgi-bin" should be changed to whatever your ScriptAliased
    637. # CGI directory exists, if you have that configured.
    638. #
    639. <Directory "/app/apache/apache/cgi-bin">
    640. AllowOverride None
    641. Options None
    642. Require all granted
    643. </Directory>
    644. <IfModule headers_module>
    645. #
    646. # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
    647. # backend servers which have lingering "httpoxy" defects.
    648. # 'Proxy' request header is undefined by the IETF, not listed by IANA
    649. #
    650. RequestHeader unset Proxy early
    651. </IfModule>
    652. <IfModule mime_module>
    653. #
    654. # TypesConfig points to the file containing the list of mappings from
    655. # filename extension to MIME-type.
    656. #
    657. TypesConfig conf/mime.types
    658. #
    659. # AddType allows you to add to or override the MIME configuration
    660. # file specified in TypesConfig for specific file types.
    661. #
    662. #AddType application/x-gzip .tgz
    663. #
    664. # AddEncoding allows you to have certain browsers uncompress
    665. # information on the fly. Note: Not all browsers support this.
    666. #
    667. #AddEncoding x-compress .Z
    668. #AddEncoding x-gzip .gz .tgz
    669. #
    670. # If the AddEncoding directives above are commented-out, then you
    671. # probably should define those extensions to indicate media types:
    672. #
    673. AddType application/x-compress .Z
    674. AddType application/x-gzip .gz .tgz
    675. #
    676. # AddHandler allows you to map certain file extensions to "handlers":
    677. # actions unrelated to filetype. These can be either built into the server
    678. # or added with the Action directive (see below)
    679. #
    680. # To use CGI scripts outside of ScriptAliased directories:
    681. # (You will also need to add "ExecCGI" to the "Options" directive.)
    682. #
    683. #AddHandler cgi-script .cgi
    684. # For type maps (negotiated resources):
    685. #AddHandler type-map var
    686. #
    687. # Filters allow you to process content before it is sent to the client.
    688. #
    689. # To parse .shtml files for server-side includes (SSI):
    690. # (You will also need to add "Includes" to the "Options" directive.)
    691. #
    692. #AddType text/html .shtml
    693. #AddOutputFilter INCLUDES .shtml
    694. </IfModule>
    695. #
    696. # The mod_mime_magic module allows the server to use various hints from the
    697. # contents of the file itself to determine its type. The MIMEMagicFile
    698. # directive tells the module where the hint definitions are located.
    699. #
    700. #MIMEMagicFile conf/magic
    701. #
    702. # Customizable error responses come in three flavors:
    703. # 1) plain text 2) local redirects 3) external redirects
    704. #
    705. # Some examples:
    706. #ErrorDocument 500 "The server made a boo boo."
    707. #ErrorDocument 404 /missing.html
    708. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
    709. #ErrorDocument 402 http://www.example.com/subscription_info.html
    710. #
    711. #
    712. # MaxRanges: Maximum number of Ranges in a request before
    713. # returning the entire resource, or one of the special
    714. # values 'default', 'none' or 'unlimited'.
    715. # Default setting is to accept 200 Ranges.
    716. #MaxRanges unlimited
    717. #
    718. # EnableMMAP and EnableSendfile: On systems that support it,
    719. # memory-mapping or the sendfile syscall may be used to deliver
    720. # files. This usually improves server performance, but must
    721. # be turned off when serving from networked-mounted
    722. # filesystems or if support for these functions is otherwise
    723. # broken on your system.
    724. # Defaults: EnableMMAP On, EnableSendfile Off
    725. #
    726. #EnableMMAP off
    727. #EnableSendfile on
    728. # Supplemental configuration
    729. #
    730. # The configuration files in the conf/extra/ directory can be
    731. # included to add extra features or to modify the default configuration of
    732. # the server, or you may simply copy their contents here and change as
    733. # necessary.
    734. # Server-pool management (MPM specific)
    735. #Include conf/extra/httpd-mpm.conf
    736. # Multi-language error messages
    737. #Include conf/extra/httpd-multilang-errordoc.conf
    738. # Fancy directory listings
    739. #Include conf/extra/httpd-autoindex.conf
    740. # Language settings
    741. #Include conf/extra/httpd-languages.conf
    742. # User home directories
    743. #Include conf/extra/httpd-userdir.conf
    744. # Real-time info on requests and configuration
    745. #Include conf/extra/httpd-info.conf
    746. # Virtual hosts
    747. #Include conf/extra/httpd-vhosts.conf
    748. # Local access to the Apache HTTP Server Manual
    749. #Include conf/extra/httpd-manual.conf
    750. # Distributed authoring and versioning (WebDAV)
    751. #Include conf/extra/httpd-dav.conf
    752. # Various default settings
    753. #Include conf/extra/httpd-default.conf
    754. # Configure mod_proxy_html to understand HTML4/XHTML1
    755. <IfModule proxy_html_module>
    756. Include conf/extra/proxy-html.conf
    757. </IfModule>
    758. # Secure (SSL/TLS) connections
    759. #Include conf/extra/httpd-ssl.conf
    760. #
    761. # Note: The following must must be present to support
    762. # starting without SSL on platforms with no /dev/random equivalent
    763. # but a statically compiled-in mod_ssl.
    764. #
    765. <IfModule ssl_module>
    766. SSLRandomSeed startup builtin
    767. SSLRandomSeed connect builtin
    768. </IfModule>
    769. ProxyRequests On
    770. ProxyVia On
    771. <Proxy *>
    772. Require all granted
    773. </Proxy>
    774. [root@test-boccfc-web ~]#