Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.43 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.2> for detailed information.
  5. # In particular, see
  6. # <URL:http://httpd.apache.org/docs/2.2/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 point the LockFile directive
  27. # at a local disk. If you wish to share the same ServerRoot for multiple
  28. # httpd daemons, you will need to change at least LockFile and PidFile.
  29. #
  30. ServerRoot "/usr/local"
  31.  
  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. #
  44. # Dynamic Shared Object (DSO) Support
  45. #
  46. # To be able to use the functionality of a module which was built as a DSO you
  47. # have to place corresponding `LoadModule' lines at this location so the
  48. # directives contained in it are actually available _before_ they are used.
  49. # Statically compiled modules (those listed by `httpd -l') do not need
  50. # to be loaded here.
  51. #
  52. # Example:
  53. # LoadModule foo_module modules/mod_foo.so
  54. #
  55.  
  56. <IfModule !mpm_netware_module>
  57. <IfModule !mpm_winnt_module>
  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 daemon
  67. Group daemon
  68.  
  69. </IfModule>
  70. </IfModule>
  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@192.168.128.103
  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 192.168.128.103:80
  99.  
  100. #
  101. # DocumentRoot: The directory out of which you will serve your
  102. # documents. By default, all requests are taken from this directory, but
  103. # symbolic links and aliases may be used to point to other locations.
  104. #
  105. DocumentRoot "/srv/httpd"
  106.  
  107. #
  108. # Each directory to which Apache has access can be configured with respect
  109. # to which services and features are allowed and/or disabled in that
  110. # directory (and its subdirectories).
  111. #
  112. # First, we configure the "default" to be a very restrictive set of
  113. # features.
  114. #
  115. <Directory />
  116. Options FollowSymLinks
  117. AllowOverride None
  118. Order deny,allow
  119. Allow from 192.168.0.
  120. </Directory>
  121.  
  122. <Directory /srv/httpd/prywatne>
  123. Options Indexes Includes FollowSymLinks MultiViews
  124. AllowOverride AuthConfig
  125. AuthName "Restricted Files"
  126.  
  127. Order deny,allow
  128. Allow from all
  129. </Directory>
  130.  
  131. #
  132. # Note that from this point forward you must specifically allow
  133. # particular features to be enabled - so if something's not working as
  134. # you might expect, make sure that you have specifically enabled it
  135. # below.
  136. #
  137.  
  138. #
  139. # This should be changed to whatever you set DocumentRoot to.
  140. #
  141. <Directory "/usr/local/htdocs">
  142. #
  143. # Possible values for the Options directive are "None", "All",
  144. # or any combination of:
  145. # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  146. #
  147. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  148. # doesn't give it to you.
  149. #
  150. # The Options directive is both complicated and important. Please see
  151. # http://httpd.apache.org/docs/2.2/mod/core.html#options
  152. # for more information.
  153. #
  154. Options Indexes FollowSymLinks
  155.  
  156. #
  157. # AllowOverride controls what directives may be placed in .htaccess files.
  158. # It can be "All", "None", or any combination of the keywords:
  159. # Options FileInfo AuthConfig Limit
  160. #
  161. AllowOverride None
  162.  
  163. #
  164. # Controls who can get stuff from this server.
  165. #
  166. Order allow,deny
  167. Allow from all
  168.  
  169. </Directory>
  170.  
  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. <FilesMatch "^\.ht">
  184. Order allow,deny
  185. Deny from all
  186. Satisfy All
  187. </FilesMatch>
  188.  
  189. #
  190. # ErrorLog: The location of the error log file.
  191. # If you do not specify an ErrorLog directive within a <VirtualHost>
  192. # container, error messages relating to that virtual host will be
  193. # logged here. If you *do* define an error logfile for a <VirtualHost>
  194. # container, that host's errors will be logged there and not here.
  195. #
  196. ErrorLog "logs/error_log"
  197.  
  198. #
  199. # LogLevel: Control the number of messages logged to the error_log.
  200. # Possible values include: debug, info, notice, warn, error, crit,
  201. # alert, emerg.
  202. #
  203. LogLevel warn
  204.  
  205. <IfModule log_config_module>
  206. #
  207. # The following directives define some format nicknames for use with
  208. # a CustomLog directive (see below).
  209. #
  210. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  211. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  212.  
  213. <IfModule logio_module>
  214. # You need to enable mod_logio.c to use %I and %O
  215. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  216. </IfModule>
  217.  
  218. #
  219. # The location and format of the access logfile (Common Logfile Format).
  220. # If you do not define any access logfiles within a <VirtualHost>
  221. # container, they will be logged here. Contrariwise, if you *do*
  222. # define per-<VirtualHost> access logfiles, transactions will be
  223. # logged therein and *not* in this file.
  224. #
  225. CustomLog "logs/access_log" common
  226.  
  227. #
  228. # If you prefer a logfile with access, agent, and referer information
  229. # (Combined Logfile Format) you can use the following directive.
  230. #
  231. #CustomLog "logs/access_log" combined
  232. </IfModule>
  233.  
  234. <IfModule alias_module>
  235. #
  236. # Redirect: Allows you to tell clients about documents that used to
  237. # exist in your server's namespace, but do not anymore. The client
  238. # will make a new request for the document at its new location.
  239. # Example:
  240. # Redirect permanent /foo http://www.example.com/bar
  241.  
  242. #
  243. # Alias: Maps web paths into filesystem paths and is used to
  244. # access content that does not live under the DocumentRoot.
  245. # Example:
  246. # Alias /webpath /full/filesystem/path
  247. #
  248. # If you include a trailing / on /webpath then the server will
  249. # require it to be present in the URL. You will also likely
  250. # need to provide a <Directory> section to allow access to
  251. # the filesystem path.
  252.  
  253. #
  254. # ScriptAlias: This controls which directories contain server scripts.
  255. # ScriptAliases are essentially the same as Aliases, except that
  256. # documents in the target directory are treated as applications and
  257. # run by the server when requested rather than as documents sent to the
  258. # client. The same rules about trailing "/" apply to ScriptAlias
  259. # directives as to Alias.
  260. #
  261. ScriptAlias /cgi-bin/ "/usr/local/cgi-bin/"
  262.  
  263. </IfModule>
  264.  
  265. <IfModule cgid_module>
  266. #
  267. # ScriptSock: On threaded servers, designate the path to the UNIX
  268. # socket used to communicate with the CGI daemon of mod_cgid.
  269. #
  270. #Scriptsock logs/cgisock
  271. </IfModule>
  272.  
  273. #
  274. # "/usr/local/cgi-bin" should be changed to whatever your ScriptAliased
  275. # CGI directory exists, if you have that configured.
  276. #
  277. <Directory "/usr/local/cgi-bin">
  278. AllowOverride None
  279. Options None
  280. Order allow,deny
  281. Allow from all
  282. </Directory>
  283.  
  284. #
  285. # DefaultType: the default MIME type the server will use for a document
  286. # if it cannot otherwise determine one, such as from filename extensions.
  287. # If your server contains mostly text or HTML documents, "text/plain" is
  288. # a good value. If most of your content is binary, such as applications
  289. # or images, you may want to use "application/octet-stream" instead to
  290. # keep browsers from trying to display binary files as though they are
  291. # text.
  292. #
  293. DefaultType text/plain
  294.  
  295. <IfModule headers_module>
  296. #
  297. # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied
  298. # backend servers which have lingering "httpoxy" defects.
  299. # 'Proxy' request header is undefined by the IETF, not listed by IANA
  300. #
  301. RequestHeader unset Proxy early
  302. </IfModule>
  303.  
  304. <IfModule mime_module>
  305. #
  306. # TypesConfig points to the file containing the list of mappings from
  307. # filename extension to MIME-type.
  308. #
  309. TypesConfig conf/mime.types
  310.  
  311. #
  312. # AddType allows you to add to or override the MIME configuration
  313. # file specified in TypesConfig for specific file types.
  314. #
  315. #AddType application/x-gzip .tgz
  316. #
  317. # AddEncoding allows you to have certain browsers uncompress
  318. # information on the fly. Note: Not all browsers support this.
  319. #
  320. #AddEncoding x-compress .Z
  321. #AddEncoding x-gzip .gz .tgz
  322. #
  323. # If the AddEncoding directives above are commented-out, then you
  324. # probably should define those extensions to indicate media types:
  325. #
  326. AddType application/x-compress .Z
  327. AddType application/x-gzip .gz .tgz
  328.  
  329. #
  330. # AddHandler allows you to map certain file extensions to "handlers":
  331. # actions unrelated to filetype. These can be either built into the server
  332. # or added with the Action directive (see below)
  333. #
  334. # To use CGI scripts outside of ScriptAliased directories:
  335. # (You will also need to add "ExecCGI" to the "Options" directive.)
  336. #
  337. #AddHandler cgi-script .cgi
  338.  
  339. # For type maps (negotiated resources):
  340. #AddHandler type-map var
  341.  
  342. #
  343. # Filters allow you to process content before it is sent to the client.
  344. #
  345. # To parse .shtml files for server-side includes (SSI):
  346. # (You will also need to add "Includes" to the "Options" directive.)
  347. #
  348. #AddType text/html .shtml
  349. #AddOutputFilter INCLUDES .shtml
  350. </IfModule>
  351.  
  352. #
  353. # The mod_mime_magic module allows the server to use various hints from the
  354. # contents of the file itself to determine its type. The MIMEMagicFile
  355. # directive tells the module where the hint definitions are located.
  356. #
  357. #MIMEMagicFile conf/magic
  358.  
  359. #
  360. # Customizable error responses come in three flavors:
  361. # 1) plain text 2) local redirects 3) external redirects
  362. #
  363. # Some examples:
  364. #ErrorDocument 500 "The server made a boo boo."
  365. #ErrorDocument 404 /missing.html
  366. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  367. #ErrorDocument 402 http://www.example.com/subscription_info.html
  368. #
  369.  
  370. #
  371. # MaxRanges: Maximum number of Ranges in a request before
  372. # returning the entire resource, or one of the special
  373. # values 'default', 'none' or 'unlimited'.
  374. # Default setting is to accept 200 Ranges.
  375. #MaxRanges unlimited
  376.  
  377. #
  378. # EnableMMAP and EnableSendfile: On systems that support it,
  379. # memory-mapping or the sendfile syscall is used to deliver
  380. # files. This usually improves server performance, but must
  381. # be turned off when serving from networked-mounted
  382. # filesystems or if support for these functions is otherwise
  383. # broken on your system.
  384. #
  385. #EnableMMAP off
  386. #EnableSendfile off
  387.  
  388. # Supplemental configuration
  389. #
  390. # The configuration files in the conf/extra/ directory can be
  391. # included to add extra features or to modify the default configuration of
  392. # the server, or you may simply copy their contents here and change as
  393. # necessary.
  394.  
  395. # Server-pool management (MPM specific)
  396. #Include conf/extra/httpd-mpm.conf
  397.  
  398. # Multi-language error messages
  399. #Include conf/extra/httpd-multilang-errordoc.conf
  400.  
  401. # Fancy directory listings
  402. #Include conf/extra/httpd-autoindex.conf
  403.  
  404. # Language settings
  405. #Include conf/extra/httpd-languages.conf
  406.  
  407. # User home directories
  408. #Include conf/extra/httpd-userdir.conf
  409.  
  410. # Real-time info on requests and configuration
  411. #Include conf/extra/httpd-info.conf
  412.  
  413. # Virtual hosts
  414. #Include conf/extra/httpd-vhosts.conf
  415.  
  416. # Local access to the Apache HTTP Server Manual
  417. #Include conf/extra/httpd-manual.conf
  418.  
  419. # Distributed authoring and versioning (WebDAV)
  420. #Include conf/extra/httpd-dav.conf
  421.  
  422. # Various default settings
  423. #Include conf/extra/httpd-default.conf
  424.  
  425. # Secure (SSL/TLS) connections
  426. #Include conf/extra/httpd-ssl.conf
  427. #
  428. # Note: The following must must be present to support
  429. # starting without SSL on platforms with no /dev/random equivalent
  430. # but a statically compiled-in mod_ssl.
  431. #
  432. <IfModule ssl_module>
  433. SSLRandomSeed startup builtin
  434. SSLRandomSeed connect builtin
  435. </IfModule>
  436.  
  437. <IfModule mod_userdir.c>
  438. # Note that the name of the user directory ("public_html") cannot easily be
  439. # changed here, since it is a compile time setting. The apache package
  440. # would have to be rebuilt. You could work around by deleting
  441. # /usr/sbin/suexec, but then all scripts from the directories would be
  442. # executed with the UID of the webserver.
  443. #
  444. # To rebuild apache with another setting you need to change the
  445. # %userdir define in the spec file.
  446.  
  447. # not every user's directory should be visible:
  448. UserDir disabled root
  449.  
  450. # to enable UserDir only for a certain set of users, use this instead:
  451. #UserDir disabled
  452. #UserDir enabled user1 user2
  453.  
  454. # the UserDir directive is actually used inside the virtual hosts, to
  455. # have more control
  456. UserDir public_html
  457.  
  458. <Directory /home/*/public_html>
  459.  
  460. AllowOverride FileInfo AuthConfig Limit Indexes
  461. Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
  462.  
  463. <Limit GET POST OPTIONS PROPFIND>
  464. Order allow,deny
  465. Allow from all
  466. </Limit>
  467.  
  468. <LimitExcept GET POST OPTIONS PROPFIND>
  469. Order deny,allow
  470. Deny from all
  471. </LimitExcept>
  472.  
  473. </Directory>
  474.  
  475. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement