Advertisement
Guest User

Apache httpd.conf

a guest
Oct 1st, 2019
1,472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
INI file 20.22 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 "logs/access_log"
  17. # with ServerRoot set to "/usr/local/apache2" will be interpreted by the
  18. # server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
  19. # will be interpreted as '/logs/access_log'.
  20. #
  21. # NOTE: Where filenames are specified, you must use forward slashes
  22. # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
  23. # If a drive letter is omitted, the drive on which httpd.exe is located
  24. # will be used by default.  It is recommended that you always supply
  25. # an explicit drive letter in absolute paths to avoid confusion.
  26.  
  27. #
  28. # ServerRoot: The top of the directory tree under which the server's
  29. # configuration, error, and log files are kept.
  30. #
  31. # Do not add a slash at the end of the directory path.  If you point
  32. # ServerRoot at a non-local disk, be sure to specify a local disk on the
  33. # Mutex directive, if file-based mutexes are used.  If you wish to share the
  34. # same ServerRoot for multiple httpd daemons, you will need to change at
  35. # least PidFile.
  36. #
  37. Define SRVROOT "C:/work/httpd/Apache24"
  38.  
  39. ServerRoot "${SRVROOT}""${SRVROOT}/htdocs"
  40. <Directory "${SRVROOT}/htdocs">
  41.     #
  42.     # Possible values for the Options directive are "None", "All",
  43.     # or any combination of:
  44.     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  45.     #
  46.     # Note that "MultiViews" must be named *explicitly* --- "Options All"
  47.     # doesn't give it to you.
  48.     #
  49.     # The Options directive is both complicated and important.  Please see
  50.     # http://httpd.apache.org/docs/2.4/mod/core.html#options
  51.     # for more information.
  52.     #
  53.     Options Indexes FollowSymLinks
  54.  
  55.     #
  56.     # AllowOverride controls what directives may be placed in .htaccess files.
  57.     # It can be "All", "None", or any combination of the keywords:
  58.     #   AllowOverride FileInfo AuthConfig Limit
  59.     #
  60.     AllowOverride None
  61.  
  62.     #
  63.     # Controls who can get stuff from this server.
  64.     #
  65.     Require all granted
  66. </Directory>
  67.  
  68. #
  69. # DirectoryIndex: sets the file that Apache will serve if a directory
  70. # is requested.
  71. #
  72. <IfModule dir_module>
  73.     DirectoryIndex index.html
  74. </IfModule>
  75.  
  76. #
  77. # The following lines prevent .htaccess and .htpasswd files from being
  78. # viewed by Web clients.
  79. #
  80. <Files ".ht*">
  81.     Require all denied
  82. </Files>
  83.  
  84. #
  85. # ErrorLog: The location of the error log file.
  86. # If you do not specify an ErrorLog directive within a <VirtualHost>
  87. # container, error messages relating to that virtual host will be
  88. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  89. # container, that host's errors will be logged there and not here.
  90. #
  91. ErrorLog "logs/error.log"
  92.  
  93. #
  94. # LogLevel: Control the number of messages logged to the error_log.
  95. # Possible values include: debug, info, notice, warn, error, crit,
  96. # alert, emerg.
  97. #
  98. LogLevel warn
  99.  
  100. <IfModule log_config_module>
  101.     #
  102.     # The following directives define some format nicknames for use with
  103.     # a CustomLog directive (see below).
  104.     #
  105.     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  106.     LogFormat "%h %l %u %t \"%r\" %>s %b" common
  107.  
  108.     <IfModule logio_module>
  109.       # You need to enable mod_logio.c to use %I and %O
  110.       LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  111.     </IfModule>
  112.  
  113.     #
  114.     # The location and format of the access logfile (Common Logfile Format).
  115.     # If you do not define any access logfiles within a <VirtualHost>
  116.     # container, they will be logged here.  Contrariwise, if you *do*
  117.     # define per-<VirtualHost> access logfiles, transactions will be
  118.     # logged therein and *not* in this file.
  119.     #
  120.     CustomLog "logs/access.log" common
  121.  
  122.     #
  123.     # If you prefer a logfile with access, agent, and referer information
  124.     # (Combined Logfile Format) you can use the following directive.
  125.     #
  126.     #CustomLog "logs/access.log" combined
  127. </IfModule>
  128.  
  129. <IfModule alias_module>
  130.     #
  131.     # Redirect: Allows you to tell clients about documents that used to
  132.     # exist in your server's namespace, but do not anymore. The client
  133.     # will make a new request for the document at its new location.
  134.     # Example:
  135.     # Redirect permanent /foo http://www.example.com/bar
  136.  
  137.     #
  138.     # Alias: Maps web paths into filesystem paths and is used to
  139.     # access content that does not live under the DocumentRoot.
  140.     # Example:
  141.     # Alias /webpath /full/filesystem/path
  142.     #
  143.     # If you include a trailing / on /webpath then the server will
  144.     # require it to be present in the URL.  You will also likely
  145.     # need to provide a <Directory> section to allow access to
  146.     # the filesystem path.
  147.  
  148.     #
  149.     # ScriptAlias: This controls which directories contain server scripts.
  150.     # ScriptAliases are essentially the same as Aliases, except that
  151.     # documents in the target directory are treated as applications and
  152.     # run by the server when requested rather than as documents sent to the
  153.     # client.  The same rules about trailing "/" apply to ScriptAlias
  154.     # directives as to Alias.
  155.     #
  156.     ScriptAlias /cgi-bin/ "${SRVROOT}/cgi-bin/"
  157.  
  158. </IfModule>
  159.  
  160. <IfModule cgid_module>
  161.     #
  162.     # ScriptSock: On threaded servers, designate the path to the UNIX
  163.     # socket used to communicate with the CGI daemon of mod_cgid.
  164.     #
  165.     #Scriptsock cgisock
  166. </IfModule>
  167.  
  168. #
  169. # "${SRVROOT}/cgi-bin" should be changed to whatever your ScriptAliased
  170. # CGI directory exists, if you have that configured.
  171. #
  172. <Directory "${SRVROOT}/cgi-bin">
  173.     AllowOverride None
  174.     Options None
  175.     Require all granted
  176. </Directory>
  177.  
  178. <IfModule headers_module>
  179.     #
  180.     # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
  181.     # backend servers which have lingering "httpoxy" defects.
  182.     # 'Proxy' request header is undefined by the IETF, not listed by IANA
  183.     #
  184.     RequestHeader unset Proxy early
  185. </IfModule>
  186.  
  187. <IfModule mime_module>
  188.     #
  189.     # TypesConfig points to the file containing the list of mappings from
  190.     # filename extension to MIME-type.
  191.     #
  192.     TypesConfig conf/mime.types
  193.  
  194.     #
  195.     # AddType allows you to add to or override the MIME configuration
  196.     # file specified in TypesConfig for specific file types.
  197.     #
  198.     #AddType application/x-gzip .tgz
  199.     #
  200.     # AddEncoding allows you to have certain browsers uncompress
  201.     # information on the fly. Note: Not all browsers support this.
  202.     #
  203.     #AddEncoding x-compress .Z
  204.     #AddEncoding x-gzip .gz .tgz
  205.     #
  206.     # If the AddEncoding directives above are commented-out, then you
  207.     # probably should define those extensions to indicate media types:
  208.     #
  209.     AddType application/x-compress .Z
  210.     AddType application/x-gzip .gz .tgz
  211.  
  212.     #
  213.     # AddHandler allows you to map certain file extensions to "handlers":
  214.     # actions unrelated to filetype. These can be either built into the server
  215.     # or added with the Action directive (see below)
  216.     #
  217.     # To use CGI scripts outside of ScriptAliased directories:
  218.     # (You will also need to add "ExecCGI" to the "Options" directive.)
  219.     #
  220.     #AddHandler cgi-script .cgi
  221.  
  222.     # For type maps (negotiated resources):
  223.     #AddHandler type-map var
  224.  
  225.     #
  226.     # Filters allow you to process content before it is sent to the client.
  227.     #
  228.     # To parse .shtml files for server-side includes (SSI):
  229.     # (You will also need to add "Includes" to the "Options" directive.)
  230.     #
  231.     #AddType text/html .shtml
  232.     #AddOutputFilter INCLUDES .shtml
  233. </IfModule>
  234.  
  235. #
  236. # The mod_mime_magic module allows the server to use various hints from the
  237. # contents of the file itself to determine its type.  The MIMEMagicFile
  238. # directive tells the module where the hint definitions are located.
  239. #
  240. #MIMEMagicFile conf/magic
  241.  
  242. #
  243. # Customizable error responses come in three flavors:
  244. # 1) plain text 2) local redirects 3) external redirects
  245. #
  246. # Some examples:
  247. #ErrorDocument 500 "The server made a boo boo."
  248. #ErrorDocument 404 /missing.html
  249. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  250. #ErrorDocument 402 http://www.example.com/subscription_info.html
  251. #
  252.  
  253. #
  254. # MaxRanges: Maximum number of Ranges in a request before
  255. # returning the entire resource, or one of the special
  256. # values 'default', 'none' or 'unlimited'.
  257. # Default setting is to accept 200 Ranges.
  258. #MaxRanges unlimited
  259.  
  260. #
  261. # EnableMMAP and EnableSendfile: On systems that support it,
  262. # memory-mapping or the sendfile syscall may be used to deliver
  263. # files.  This usually improves server performance, but must
  264. # be turned off when serving from networked-mounted
  265. # filesystems or if support for these functions is otherwise
  266. # broken on your system.
  267. # Defaults: EnableMMAP On, EnableSendfile Off
  268. #
  269. #EnableMMAP off
  270. #EnableSendfile on
  271.  
  272. # Supplemental configuration
  273. #
  274. # The configuration files in the conf/extra/ directory can be
  275. # included to add extra features or to modify the default configuration of
  276. # the server, or you may simply copy their contents here and change as
  277. # necessary.
  278.  
  279. # Server-pool management (MPM specific)
  280. #Include conf/extra/httpd-mpm.conf
  281.  
  282. # Multi-language error messages
  283. #Include conf/extra/httpd-multilang-errordoc.conf
  284.  
  285. # Fancy directory listings
  286. #Include conf/extra/httpd-autoindex.conf
  287.  
  288. # Language settings
  289. #Include conf/extra/httpd-languages.conf
  290.  
  291. # User home directories
  292. #Include conf/extra/httpd-userdir.conf
  293.  
  294. # Real-time info on requests and configuration
  295. #Include conf/extra/httpd-info.conf
  296.  
  297. # Virtual hosts
  298. Include conf/extra/httpd-vhosts.conf
  299.  
  300. # Local access to the Apache HTTP Server Manual
  301. #Include conf/extra/httpd-manual.conf
  302.  
  303. # Distributed authoring and versioning (WebDAV)
  304. #Include conf/extra/httpd-dav.conf
  305.  
  306. # Various default settings
  307. #Include conf/extra/httpd-default.conf
  308.  
  309. # Configure mod_proxy_html to understand HTML4/XHTML1
  310. <IfModule proxy_html_module>
  311. Include conf/extra/proxy-html.conf
  312. </IfModule>
  313.  
  314. # Secure (SSL/TLS) connections
  315. #Include conf/extra/httpd-ssl.conf
  316. #
  317. # Note: The following must must be present to support
  318. #       starting without SSL on platforms with no /dev/random equivalent
  319. #       but a statically compiled-in mod_ssl.
  320. #
  321. <IfModule ssl_module>
  322. SSLRandomSeed startup builtin
  323. SSLRandomSeed connect builtin
  324. </IfModule>
  325.  
  326. LoadModule php7_module "C:/work/php-7/php7apache2_4.dll"
  327. AddType application/x-httpd-php .php
  328. AddType application/x-httpd-php-source .phps
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement