Advertisement
hafiizhekom

[XAPPS] /etc/httpd/conf/httpd.conf

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