Advertisement
GWibisono

httpd.conf

Mar 11th, 2016
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 12.52 KB | None | 0 0
  1. #di atas ada module.. saya tidak masukkan
  2. <IfModule unixd_module>
  3. #
  4. # If you wish httpd to run as a different user or group, you must run
  5. # httpd as root initially and it will switch.  
  6. #
  7. # User/Group: The name (or #number) of the user/group to run httpd as.
  8. # It is usually good practice to create a dedicated user and group for
  9. # running httpd, as with most system services.
  10. #
  11. User daemon
  12. Group daemon
  13.  
  14. </IfModule>
  15.  
  16. # 'Main' server configuration
  17. #
  18. # The directives in this section set up the values used by the 'main'
  19. # server, which responds to any requests that aren't handled by a
  20. # <VirtualHost> definition.  These values also provide defaults for
  21. # any <VirtualHost> containers you may define later in the file.
  22. #
  23. # All of these directives may appear inside <VirtualHost> containers,
  24. # in which case these default settings will be overridden for the
  25. # virtual host being defined.
  26. #
  27.  
  28. #
  29. # ServerAdmin: Your address, where problems with the server should be
  30. # e-mailed.  This address appears on some server-generated pages, such
  31. # as error documents.  e.g. admin@your-domain.com
  32. #
  33. ServerAdmin postmaster@localhost
  34.  
  35. #
  36. # ServerName gives the name and port that the server uses to identify itself.
  37. # This can often be determined automatically, but we recommend you specify
  38. # it explicitly to prevent problems during startup.
  39. #
  40. # If your host doesn't have a registered DNS name, enter its IP address here.
  41. #
  42. ServerName localhost:80
  43.  
  44. #
  45. # Deny access to the entirety of your server's filesystem. You must
  46. # explicitly permit access to web content directories in other
  47. # <Directory> blocks below.
  48. #
  49. <Directory />
  50.     AllowOverride none
  51.     Require all denied
  52. #   Require all granted
  53. ##  Options FollowSymLinks
  54. ##    AllowOverride None
  55. #    Order deny,allow
  56. #    Deny from all
  57. </Directory>
  58.  
  59. #
  60. # Note that from this point forward you must specifically allow
  61. # particular features to be enabled - so if something's not working as
  62. # you might expect, make sure that you have specifically enabled it
  63. # below.
  64. #
  65.  
  66. #
  67. # DocumentRoot: The directory out of which you will serve your
  68. # documents. By default, all requests are taken from this directory, but
  69. # symbolic links and aliases may be used to point to other locations.
  70. #
  71. DocumentRoot "C:/php_folder/php"
  72. <Directory "C:/php_folder/php">
  73.     #
  74.    # Possible values for the Options directive are "None", "All",
  75.    # or any combination of:
  76.    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  77.    #
  78.    # Note that "MultiViews" must be named *explicitly* --- "Options All"
  79.    # doesn't give it to you.
  80.    #
  81.    # The Options directive is both complicated and important.  Please see
  82.    # http://httpd.apache.org/docs/2.4/mod/core.html#options
  83.    # for more information.
  84.    #
  85.    Options Indexes FollowSymLinks Includes ExecCGI
  86.  
  87.     #
  88.    # AllowOverride controls what directives may be placed in .htaccess files.
  89.    # It can be "All", "None", or any combination of the keywords:
  90.    #   AllowOverride FileInfo AuthConfig Limit
  91.    #
  92.    AllowOverride All
  93.  
  94.     #
  95.    # Controls who can get stuff from this server.
  96.    #
  97.    Require all granted
  98. </Directory>
  99.  
  100. #
  101. # DirectoryIndex: sets the file that Apache will serve if a directory
  102. # is requested.
  103. #
  104. <IfModule dir_module>
  105.     DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
  106.                    default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
  107.                    home.php home.pl home.cgi home.asp home.shtml home.html home.htm
  108. </IfModule>
  109.  
  110. #
  111. # The following lines prevent .htaccess and .htpasswd files from being
  112. # viewed by Web clients.
  113. #
  114. <Files ".ht*">
  115.     Require all denied
  116. </Files>
  117.  
  118. #
  119. # ErrorLog: The location of the error log file.
  120. # If you do not specify an ErrorLog directive within a <VirtualHost>
  121. # container, error messages relating to that virtual host will be
  122. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  123. # container, that host's errors will be logged there and not here.
  124. #
  125. ErrorLog "logs/error.log"
  126.  
  127. #
  128. # LogLevel: Control the number of messages logged to the error_log.
  129. # Possible values include: debug, info, notice, warn, error, crit,
  130. # alert, emerg.
  131. #
  132. LogLevel debug
  133.  
  134. <IfModule log_config_module>
  135.     #
  136.    # The following directives define some format nicknames for use with
  137.    # a CustomLog directive (see below).
  138.    #
  139.    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  140.     LogFormat "%h %l %u %t \"%r\" %>s %b" common
  141.  
  142.     <IfModule logio_module>
  143.       # You need to enable mod_logio.c to use %I and %O
  144.      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  145.     </IfModule>
  146.  
  147.     #
  148.    # The location and format of the access logfile (Common Logfile Format).
  149.    # If you do not define any access logfiles within a <VirtualHost>
  150.    # container, they will be logged here.  Contrariwise, if you *do*
  151.    # define per-<VirtualHost> access logfiles, transactions will be
  152.    # logged therein and *not* in this file.
  153.    #
  154.    #CustomLog "logs/access.log" common
  155.  
  156.     #
  157.    # If you prefer a logfile with access, agent, and referer information
  158.    # (Combined Logfile Format) you can use the following directive.
  159.    #
  160.    CustomLog "logs/access.log" combined
  161. </IfModule>
  162.  
  163. <IfModule alias_module>
  164.     #
  165.    # Redirect: Allows you to tell clients about documents that used to
  166.    # exist in your server's namespace, but do not anymore. The client
  167.    # will make a new request for the document at its new location.
  168.    # Example:
  169.    # Redirect permanent /foo http://www.example.com/bar
  170.  
  171.     #
  172.    # Alias: Maps web paths into filesystem paths and is used to
  173.    # access content that does not live under the DocumentRoot.
  174.    # Example:
  175.    # Alias /webpath /full/filesystem/path
  176.    #
  177.    # If you include a trailing / on /webpath then the server will
  178.    # require it to be present in the URL.  You will also likely
  179.    # need to provide a <Directory> section to allow access to
  180.    # the filesystem path.
  181.  
  182.     #
  183.    # ScriptAlias: This controls which directories contain server scripts.
  184.    # ScriptAliases are essentially the same as Aliases, except that
  185.    # documents in the target directory are treated as applications and
  186.    # run by the server when requested rather than as documents sent to the
  187.    # client.  The same rules about trailing "/" apply to ScriptAlias
  188.    # directives as to Alias.
  189.    #
  190.    ScriptAlias /cgi-bin/ "C:/app/cgi-bin/"
  191.  
  192. </IfModule>
  193.  
  194. <IfModule cgid_module>
  195.     #
  196.    # ScriptSock: On threaded servers, designate the path to the UNIX
  197.    # socket used to communicate with the CGI daemon of mod_cgid.
  198.    #
  199.    #Scriptsock cgisock
  200. </IfModule>
  201.  
  202. #
  203. # "C:/app/cgi-bin" should be changed to whatever your ScriptAliased
  204. # CGI directory exists, if you have that configured.
  205. #
  206. <Directory "C:/app/cgi-bin">
  207.     AllowOverride All
  208.     Options None
  209.     Require all granted
  210. </Directory>
  211.  
  212. <IfModule mime_module>
  213.     #
  214.    # TypesConfig points to the file containing the list of mappings from
  215.    # filename extension to MIME-type.
  216.    #
  217.    TypesConfig conf/mime.types
  218.  
  219.     #
  220.    # AddType allows you to add to or override the MIME configuration
  221.    # file specified in TypesConfig for specific file types.
  222.    #
  223.    #AddType application/x-gzip .tgz
  224.    #
  225.    # AddEncoding allows you to have certain browsers uncompress
  226.    # information on the fly. Note: Not all browsers support this.
  227.    #
  228.    #AddEncoding x-compress .Z
  229.    #AddEncoding x-gzip .gz .tgz
  230.    #
  231.    # If the AddEncoding directives above are commented-out, then you
  232.    # probably should define those extensions to indicate media types:
  233.    #
  234.    AddType application/x-compress .Z
  235.     AddType application/x-gzip .gz .tgz
  236.  
  237.     #
  238.    # AddHandler allows you to map certain file extensions to "handlers":
  239.    # actions unrelated to filetype. These can be either built into the server
  240.    # or added with the Action directive (see below)
  241.    #
  242.    # To use CGI scripts outside of ScriptAliased directories:
  243.    # (You will also need to add "ExecCGI" to the "Options" directive.)
  244.    #
  245.    AddHandler cgi-script .cgi .pl .asp
  246.  
  247.     # For type maps (negotiated resources):
  248.    #AddHandler type-map var
  249.  
  250.     #
  251.    # Filters allow you to process content before it is sent to the client.
  252.    #
  253.    # To parse .shtml files for server-side includes (SSI):
  254.    # (You will also need to add "Includes" to the "Options" directive.)
  255.    #
  256.    AddType text/html .shtml
  257.     AddOutputFilter INCLUDES .shtml
  258. </IfModule>
  259.  
  260. #
  261. # The mod_mime_magic module allows the server to use various hints from the
  262. # contents of the file itself to determine its type.  The MIMEMagicFile
  263. # directive tells the module where the hint definitions are located.
  264. #
  265. <IfModule mime_magic_module>
  266.     #
  267.    # The mod_mime_magic module allows the server to use various hints from the
  268.    # contents of the file itself to determine its type.  The MIMEMagicFile
  269.    # directive tells the module where the hint definitions are located.
  270.    #
  271.    MIMEMagicFile "conf/magic"
  272. </IfModule>
  273.  
  274.  
  275. #
  276. # Customizable error responses come in three flavors:
  277. # 1) plain text 2) local redirects 3) external redirects
  278. #
  279. # Some examples:
  280. #ErrorDocument 500 "The server made a boo boo."
  281. #ErrorDocument 404 /missing.html
  282. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  283. #ErrorDocument 402 http://www.example.com/subscription_info.html
  284. #
  285.  
  286. #
  287. # MaxRanges: Maximum number of Ranges in a request before
  288. # returning the entire resource, or one of the special
  289. # values 'default', 'none' or 'unlimited'.
  290. # Default setting is to accept 200 Ranges.
  291. #MaxRanges unlimited
  292.  
  293. #
  294. # EnableMMAP and EnableSendfile: On systems that support it,
  295. # memory-mapping or the sendfile syscall may be used to deliver
  296. # files.  This usually improves server performance, but must
  297. # be turned off when serving from networked-mounted
  298. # filesystems or if support for these functions is otherwise
  299. # broken on your system.
  300. # Defaults: EnableMMAP On, EnableSendfile Off
  301. #
  302. #EnableMMAP off
  303. #EnableSendfile off
  304.  
  305. # Supplemental configuration
  306. #
  307. # The configuration files in the conf/extra/ directory can be
  308. # included to add extra features or to modify the default configuration of
  309. # the server, or you may simply copy their contents here and change as
  310. # necessary.
  311.  
  312. # Server-pool management (MPM specific)
  313. Include conf/extra/httpd-mpm.conf
  314.  
  315. # Multi-language error messages
  316. Include conf/extra/httpd-multilang-errordoc.conf
  317.  
  318. # Fancy directory listings
  319. Include conf/extra/httpd-autoindex.conf
  320.  
  321. # Language settings
  322. Include conf/extra/httpd-languages.conf
  323.  
  324. # User home directories
  325. Include conf/extra/httpd-userdir.conf
  326.  
  327. # Real-time info on requests and configuration
  328. Include conf/extra/httpd-info.conf
  329.  
  330. # Virtual hosts
  331. Include conf/extra/httpd-vhosts.conf
  332.  
  333. # Local access to the Apache HTTP Server Manual
  334. #Include conf/extra/httpd-manual.conf
  335.  
  336. # Distributed authoring and versioning (WebDAV)
  337. #Attention! WEB_DAV is a security risk without a new userspecific configuration for a secure authentifcation
  338. #Include conf/extra/httpd-dav.conf
  339.  
  340. # Various default settings
  341. #Include conf/extra/httpd-default.conf
  342. # Implements a proxy/gateway for Apache.
  343. Include "conf/extra/httpd-proxy.conf"
  344. # Various default settings
  345. Include "conf/extra/httpd-default.conf"
  346. # XAMPP settings
  347. Include "conf/extra/httpd-xampp.conf"
  348.  
  349. # Configure mod_proxy_html to understand HTML4/XHTML1
  350. <IfModule proxy_html_module>
  351. Include conf/extra/proxy-html.conf
  352. </IfModule>
  353.  
  354. # Secure (SSL/TLS) connections
  355. Include conf/extra/httpd-ssl.conf
  356. #
  357. # Note: The following must must be present to support
  358. #       starting without SSL on platforms with no /dev/random equivalent
  359. #       but a statically compiled-in mod_ssl.
  360. #
  361. <IfModule ssl_module>
  362. SSLRandomSeed startup builtin
  363. SSLRandomSeed connect builtin
  364. </IfModule>
  365. #
  366. # uncomment out the below to deal with user agents that deliberately
  367. # violate open standards by misusing DNT (DNT *must* be a specific
  368. # end-user choice)
  369. #
  370. #<IfModule setenvif_module>
  371. #BrowserMatch "MSIE 10.0;" bad_DNT
  372. #</IfModule>
  373. #<IfModule headers_module>
  374. #RequestHeader unset DNT env=bad_DNT
  375. #</IfModule>
  376.  
  377. # XAMPP: We disable operating system specific optimizations for a listening
  378. # socket by the http protocol here. IE 64 bit make problems without this.
  379.  
  380. AcceptFilter http none
  381.  
  382. # AJP13 Proxy
  383. <IfModule mod_proxy.c>
  384. <IfModule mod_proxy_ajp.c>
  385. Include "conf/extra/httpd-ajp.conf"
  386. </IfModule>
  387. </IfModule>
  388.  
  389. #=================
  390. #Include "conf/alias/*"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement