Advertisement
Guest User

httpd.conf

a guest
Nov 27th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.34 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. #
  34. # Listen: Allows you to bind Apache to specific IP addresses and/or
  35. # ports, instead of the default. See also the <VirtualHost>
  36. # directive.
  37. #
  38. # Change this to Listen on specific IP addresses as shown below to
  39. # prevent Apache from glomming onto all bound IP addresses.
  40. #
  41. #Listen 12.34.56.78:80
  42. Listen 80
  43.  
  44. NameVirtualHost *:80
  45.  
  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. #
  102. # Deny access to the entirety of your server's filesystem. You must
  103. # explicitly permit access to web content directories in other
  104. # <Directory> blocks below.
  105. #
  106. <Directory />
  107. AllowOverride none
  108. Require all denied
  109. </Directory>
  110.  
  111. #
  112. # Note that from this point forward you must specifically allow
  113. # particular features to be enabled - so if something's not working as
  114. # you might expect, make sure that you have specifically enabled it
  115. # below.
  116. #
  117.  
  118. #
  119. # DocumentRoot: The directory out of which you will serve your
  120. # documents. By default, all requests are taken from this directory, but
  121. # symbolic links and aliases may be used to point to other locations.
  122. #
  123. #DocumentRoot "/var/www/html" #Comentei esta linha original
  124.  
  125. DocumentRoot "/var/www"
  126.  
  127.  
  128. <VirtualHost *:80>
  129. DocumentRoot /var/www/html/joao
  130. ServerName www.joao.net
  131. # Other Apache config directives, logs etc.
  132. </VirtualHost>
  133.  
  134. <VirtualHost *:80>
  135. DocumentRoot /var/www/html/maria
  136. ServerName www.maria.net
  137. # Other Apache config directives, logs etc.
  138. </VirtualHost>
  139.  
  140. <VirtualHost *:80>
  141. DocumentRoot /var/www/html/fhistart
  142. ServerName www.fhistart.com
  143. # Other Apache config directives, logs etc.
  144. </VirtualHost>
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151. #
  152. # Relax access to content within /var/www.
  153. #
  154. <Directory "/var/www">
  155. AllowOverride None
  156. # Allow open access:
  157. Require all granted
  158. </Directory>
  159.  
  160. # Further relax access to the default document root:
  161. <Directory "/var/www/html">
  162. #
  163. # Possible values for the Options directive are "None", "All",
  164. # or any combination of:
  165. # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  166. #
  167. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  168. # doesn't give it to you.
  169. #
  170. # The Options directive is both complicated and important. Please see
  171. # http://httpd.apache.org/docs/2.4/mod/core.html#options
  172. # for more information.
  173. #
  174. Options Indexes FollowSymLinks
  175.  
  176. #
  177. # AllowOverride controls what directives may be placed in .htaccess files.
  178. # It can be "All", "None", or any combination of the keywords:
  179. # Options FileInfo AuthConfig Limit
  180. #
  181. AllowOverride None
  182.  
  183. #
  184. # Controls who can get stuff from this server.
  185. #
  186. Require all granted
  187. </Directory>
  188.  
  189. #
  190. # DirectoryIndex: sets the file that Apache will serve if a directory
  191. # is requested.
  192. #
  193. <IfModule dir_module>
  194. DirectoryIndex index.html
  195. </IfModule>
  196.  
  197. #
  198. # The following lines prevent .htaccess and .htpasswd files from being
  199. # viewed by Web clients.
  200. #
  201. <Files ".ht*">
  202. Require all denied
  203. </Files>
  204.  
  205. #
  206. # ErrorLog: The location of the error log file.
  207. # If you do not specify an ErrorLog directive within a <VirtualHost>
  208. # container, error messages relating to that virtual host will be
  209. # logged here. If you *do* define an error logfile for a <VirtualHost>
  210. # container, that host's errors will be logged there and not here.
  211. #
  212. ErrorLog "logs/error_log"
  213.  
  214. #
  215. # LogLevel: Control the number of messages logged to the error_log.
  216. # Possible values include: debug, info, notice, warn, error, crit,
  217. # alert, emerg.
  218. #
  219. LogLevel warn
  220.  
  221. <IfModule log_config_module>
  222. #
  223. # The following directives define some format nicknames for use with
  224. # a CustomLog directive (see below).
  225. #
  226. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  227. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  228.  
  229. <IfModule logio_module>
  230. # You need to enable mod_logio.c to use %I and %O
  231. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  232. </IfModule>
  233.  
  234. #
  235. # The location and format of the access logfile (Common Logfile Format).
  236. # If you do not define any access logfiles within a <VirtualHost>
  237. # container, they will be logged here. Contrariwise, if you *do*
  238. # define per-<VirtualHost> access logfiles, transactions will be
  239. # logged therein and *not* in this file.
  240. #
  241. #CustomLog "logs/access_log" common
  242.  
  243. #
  244. # If you prefer a logfile with access, agent, and referer information
  245. # (Combined Logfile Format) you can use the following directive.
  246. #
  247. CustomLog "logs/access_log" combined
  248. </IfModule>
  249.  
  250. <IfModule alias_module>
  251. #
  252. # Redirect: Allows you to tell clients about documents that used to
  253. # exist in your server's namespace, but do not anymore. The client
  254. # will make a new request for the document at its new location.
  255. # Example:
  256. # Redirect permanent /foo http://www.example.com/bar
  257.  
  258. #
  259. # Alias: Maps web paths into filesystem paths and is used to
  260. # access content that does not live under the DocumentRoot.
  261. # Example:
  262. # Alias /webpath /full/filesystem/path
  263. #
  264. # If you include a trailing / on /webpath then the server will
  265. # require it to be present in the URL. You will also likely
  266. # need to provide a <Directory> section to allow access to
  267. # the filesystem path.
  268.  
  269. #
  270. # ScriptAlias: This controls which directories contain server scripts.
  271. # ScriptAliases are essentially the same as Aliases, except that
  272. # documents in the target directory are treated as applications and
  273. # run by the server when requested rather than as documents sent to the
  274. # client. The same rules about trailing "/" apply to ScriptAlias
  275. # directives as to Alias.
  276. #
  277. ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
  278.  
  279. </IfModule>
  280.  
  281. #
  282. # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
  283. # CGI directory exists, if you have that configured.
  284. #
  285. <Directory "/var/www/cgi-bin">
  286. AllowOverride None
  287. Options None
  288. Require all granted
  289. </Directory>
  290.  
  291. <IfModule mime_module>
  292. #
  293. # TypesConfig points to the file containing the list of mappings from
  294. # filename extension to MIME-type.
  295. #
  296. TypesConfig /etc/mime.types
  297.  
  298. #
  299. # AddType allows you to add to or override the MIME configuration
  300. # file specified in TypesConfig for specific file types.
  301. #
  302. #AddType application/x-gzip .tgz
  303. #
  304. # AddEncoding allows you to have certain browsers uncompress
  305. # information on the fly. Note: Not all browsers support this.
  306. #
  307. #AddEncoding x-compress .Z
  308. #AddEncoding x-gzip .gz .tgz
  309. #
  310. # If the AddEncoding directives above are commented-out, then you
  311. # probably should define those extensions to indicate media types:
  312. #
  313. AddType application/x-compress .Z
  314. AddType application/x-gzip .gz .tgz
  315.  
  316. #
  317. # AddHandler allows you to map certain file extensions to "handlers":
  318. # actions unrelated to filetype. These can be either built into the server
  319. # or added with the Action directive (see below)
  320. #
  321. # To use CGI scripts outside of ScriptAliased directories:
  322. # (You will also need to add "ExecCGI" to the "Options" directive.)
  323. #
  324. #AddHandler cgi-script .cgi
  325.  
  326. # For type maps (negotiated resources):
  327. #AddHandler type-map var
  328.  
  329. #
  330. # Filters allow you to process content before it is sent to the client.
  331. #
  332. # To parse .shtml files for server-side includes (SSI):
  333. # (You will also need to add "Includes" to the "Options" directive.)
  334. #
  335. AddType text/html .shtml
  336. AddOutputFilter INCLUDES .shtml
  337. </IfModule>
  338.  
  339. #
  340. # Specify a default charset for all content served; this enables
  341. # interpretation of all content as UTF-8 by default. To use the
  342. # default browser choice (ISO-8859-1), or to allow the META tags
  343. # in HTML content to override this choice, comment out this
  344. # directive:
  345. #
  346. AddDefaultCharset UTF-8
  347.  
  348. <IfModule mime_magic_module>
  349. #
  350. # The mod_mime_magic module allows the server to use various hints from the
  351. # contents of the file itself to determine its type. The MIMEMagicFile
  352. # directive tells the module where the hint definitions are located.
  353. #
  354. MIMEMagicFile conf/magic
  355. </IfModule>
  356.  
  357. #
  358. # Customizable error responses come in three flavors:
  359. # 1) plain text 2) local redirects 3) external redirects
  360. #
  361. # Some examples:
  362. #ErrorDocument 500 "The server made a boo boo."
  363. #ErrorDocument 404 /missing.html
  364. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  365. #ErrorDocument 402 http://www.example.com/subscription_info.html
  366. #
  367.  
  368. #
  369. # EnableMMAP and EnableSendfile: On systems that support it,
  370. # memory-mapping or the sendfile syscall may be used to deliver
  371. # files. This usually improves server performance, but must
  372. # be turned off when serving from networked-mounted
  373. # filesystems or if support for these functions is otherwise
  374. # broken on your system.
  375. # Defaults if commented: EnableMMAP On, EnableSendfile Off
  376. #
  377. #EnableMMAP off
  378. EnableSendfile on
  379.  
  380. # Supplemental configuration
  381. #
  382. # Load config files in the "/etc/httpd/conf.d" directory, if any.
  383. IncludeOptional conf.d/*.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement