当前位置:  首页>> 技术小册>> Web服务器Apache详解

一、默认网站

每一个web服务器软件一般默认都会提供一个用于测试的网站,apache也为用户提供了一个默认网站。默认网站的配置写在默认配置文件中。

二、配置文件

[root@zutuanxue conf]# cat httpd.conf

  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. # ServerRoot: The top of the directory tree under which the server's
  22. # configuration, error, and log files are kept.
  23. #
  24. # Do not add a slash at the end of the directory path. If you point
  25. # ServerRoot at a non-local disk, be sure to specify a local disk on the
  26. # Mutex directive, if file-based mutexes are used. If you wish to share the
  27. # same ServerRoot for multiple httpd daemons, you will need to change at
  28. # least PidFile.
  29. #
  30. #apache软件根目录,apache安装路径。
  31. ServerRoot "/usr/local/apache"
  32. #
  33. # Mutex: Allows you to set the mutex mechanism and mutex file directory
  34. # for individual mutexes, or change the global defaults
  35. #
  36. # Uncomment and change the directory if mutexes are file-based and the default
  37. # mutex file directory is not on a local disk or is not appropriate for some
  38. # other reason.
  39. #
  40. # Mutex default:logs
  41. #
  42. # Listen: Allows you to bind Apache to specific IP addresses and/or
  43. # ports, instead of the default. See also the <VirtualHost>
  44. # directive.
  45. #
  46. # Change this to Listen on specific IP addresses as shown below to
  47. # prevent Apache from glomming onto all bound IP addresses.
  48. #
  49. #设置apache监听端口及监听IP地址
  50. #Listen 12.34.56.78:80
  51. Listen 80
  52. #
  53. # Dynamic Shared Object (DSO) Support
  54. #
  55. # To be able to use the functionality of a module which was built as a DSO you
  56. # have to place corresponding `LoadModule' lines at this location so the
  57. # directives contained in it are actually available _before_ they are used.
  58. # Statically compiled modules (those listed by `httpd -l') do not need
  59. # to be loaded here.
  60. #
  61. # 动态共享对象支持,使用LoadModule指令为apaceh添加功能模块 --enable-so
  62. # Example:
  63. # LoadModule foo_module modules/mod_foo.so
  64. #
  65. # 可载入模块,参考(http://httpd.apache.org/docs/2.4/mod/)
  66. LoadModule mpm_event_module modules/mod_mpm_event.so
  67. #LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
  68. #LoadModule mpm_worker_module modules/mod_mpm_worker.so
  69. LoadModule authn_file_module modules/mod_authn_file.so
  70. #LoadModule authn_dbm_module modules/mod_authn_dbm.so
  71. #LoadModule authn_anon_module modules/mod_authn_anon.so
  72. #LoadModule authn_dbd_module modules/mod_authn_dbd.so
  73. #LoadModule authn_socache_module modules/mod_authn_socache.so
  74. LoadModule authn_core_module modules/mod_authn_core.so
  75. LoadModule authz_host_module modules/mod_authz_host.so
  76. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  77. LoadModule authz_user_module modules/mod_authz_user.so
  78. #LoadModule authz_dbm_module modules/mod_authz_dbm.so
  79. #LoadModule authz_owner_module modules/mod_authz_owner.so
  80. #LoadModule authz_dbd_module modules/mod_authz_dbd.so
  81. LoadModule authz_core_module modules/mod_authz_core.so
  82. LoadModule access_compat_module modules/mod_access_compat.so
  83. LoadModule auth_basic_module modules/mod_auth_basic.so
  84. #LoadModule auth_form_module modules/mod_auth_form.so
  85. #LoadModule auth_digest_module modules/mod_auth_digest.so
  86. #LoadModule allowmethods_module modules/mod_allowmethods.so
  87. #LoadModule file_cache_module modules/mod_file_cache.so
  88. #LoadModule cache_module modules/mod_cache.so
  89. #LoadModule cache_disk_module modules/mod_cache_disk.so
  90. #LoadModule cache_socache_module modules/mod_cache_socache.so
  91. #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
  92. #LoadModule socache_dbm_module modules/mod_socache_dbm.so
  93. #LoadModule socache_memcache_module modules/mod_socache_memcache.so
  94. #LoadModule socache_redis_module modules/mod_socache_redis.so
  95. #LoadModule watchdog_module modules/mod_watchdog.so
  96. #LoadModule macro_module modules/mod_macro.so
  97. #LoadModule dbd_module modules/mod_dbd.so
  98. #LoadModule dumpio_module modules/mod_dumpio.so
  99. #LoadModule buffer_module modules/mod_buffer.so
  100. #LoadModule ratelimit_module modules/mod_ratelimit.so
  101. LoadModule reqtimeout_module modules/mod_reqtimeout.so
  102. #LoadModule ext_filter_module modules/mod_ext_filter.so
  103. #LoadModule request_module modules/mod_request.so
  104. #LoadModule include_module modules/mod_include.so
  105. LoadModule filter_module modules/mod_filter.so
  106. #LoadModule substitute_module modules/mod_substitute.so
  107. #LoadModule sed_module modules/mod_sed.so
  108. #LoadModule deflate_module modules/mod_deflate.so
  109. LoadModule mime_module modules/mod_mime.so
  110. LoadModule log_config_module modules/mod_log_config.so
  111. #LoadModule log_debug_module modules/mod_log_debug.so
  112. #LoadModule logio_module modules/mod_logio.so
  113. LoadModule env_module modules/mod_env.so
  114. #LoadModule expires_module modules/mod_expires.so
  115. LoadModule headers_module modules/mod_headers.so
  116. #LoadModule unique_id_module modules/mod_unique_id.so
  117. LoadModule setenvif_module modules/mod_setenvif.so
  118. LoadModule version_module modules/mod_version.so
  119. #LoadModule remoteip_module modules/mod_remoteip.so
  120. #LoadModule proxy_module modules/mod_proxy.so
  121. #LoadModule proxy_connect_module modules/mod_proxy_connect.so
  122. #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  123. #LoadModule proxy\_http_module modules/mod_proxy_http.so
  124. #LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
  125. #LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
  126. #LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so
  127. #LoadModule proxy_fdpass_module modules/mod_proxy_fdpass.so
  128. #LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
  129. #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
  130. #LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  131. #LoadModule proxy_express_module modules/mod_proxy_express.so
  132. #LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
  133. #LoadModule session_module modules/mod_session.so
  134. #LoadModule session_cookie_module modules/mod_session_cookie.so
  135. #LoadModule session_dbd_module modules/mod_session_dbd.so
  136. #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
  137. #LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
  138. #LoadModule lbmethod_bytraffic_module modules/mod_lbmethod_bytraffic.so
  139. #LoadModule lbmethod_bybusyness_module modules/mod_lbmethod_bybusyness.so
  140. #LoadModule lbmethod_heartbeat_module modules/mod_lbmethod_heartbeat.so
  141. LoadModule unixd_module modules/mod_unixd.so
  142. #LoadModule dav_module modules/mod_dav.so
  143. LoadModule status_module modules/mod_status.so
  144. LoadModule autoindex_module modules/mod_autoindex.so
  145. #LoadModule info_module modules/mod_info.so
  146. #LoadModule cgid_module modules/mod_cgid.so
  147. #LoadModule dav_fs_module modules/mod_dav_fs.so
  148. #LoadModule vhost_alias_module modules/mod_vhost_alias.so
  149. #LoadModule negotiation_module modules/mod_negotiation.so
  150. LoadModule dir_module modules/mod_dir.so
  151. #LoadModule actions_module modules/mod_actions.so
  152. #LoadModule speling_module modules/mod_speling.so
  153. LoadModule alias_module modules/mod_alias.so
  154. #LoadModule rewrite_module modules/mod_rewrite.so
  155. #启用模块 unixd_module 设置apache守护进程httpd的管理用户和组
  156. #启用模块注意格式 <IfModule 模块名称_module>
  157. #结束</IfModule>
  158. #启用的前提是已经使用LoadModule指令载入了该模块
  159. <IfModule unixd\_module>
  160. #
  161. # If you wish httpd to run as a different user or group, you must run
  162. # httpd as root initially and it will switch.
  163. #
  164. # User/Group: The name (or #number) of the user/group to run httpd as.
  165. # It is usually good practice to create a dedicated user and group for
  166. # running httpd, as with most system services.
  167. #
  168. #指定守护进程httpd的管理用户
  169. User daemon
  170. #指定守护进程httpd的管理组
  171. Group daemon
  172. </IfModule>
  173. # 'Main' server configuration
  174. #
  175. # The directives in this section set up the values used by the 'main'
  176. # server, which responds to any requests that aren't handled by a
  177. # &lt;VirtualHost&gt; definition. These values also provide defaults for
  178. # any &lt;VirtualHost&gt; containers you may define later in the file.
  179. #
  180. # All of these directives may appear inside &lt;VirtualHost&gt; containers,
  181. # in which case these default settings will be overridden for the
  182. # virtual host being defined.
  183. #
  184. #
  185. # ServerAdmin: Your address, where problems with the server should be
  186. # e-mailed. This address appears on some server-generated pages, such
  187. # as error documents. e.g. admin@your-domain.com
  188. #
  189. #指定管理员email地址
  190. ServerAdmin you@example.com
  191. #
  192. # ServerName gives the name and port that the server uses to identify itself.
  193. # This can often be determined automatically, but we recommend you specify
  194. # it explicitly to prevent problems during startup.
  195. #
  196. # If your host doesn't have a registered DNS name, enter its IP address here.
  197. #
  198. #指定服务器在DNS上注册的名称 FQDN
  199. #ServerName www.example.com:80
  200. ServerName 127.0.0.1
  201. #
  202. # Deny access to the entirety of your server's filesystem. You must
  203. # explicitly permit access to web content directories in other
  204. # &lt;Directory&gt; blocks below.
  205. #
  206. #apache 目录访问权限
  207. #使用<Directory /path> 指定目录路径
  208. #拒绝用户通过apache访问你的文件系统/及以下的所有内容
  209. <Directory >
  210. #是否允许.htaccess实现权限复写
  211. AllowOverride none
  212. #设置所有人的访问权限 denied 拒绝 granted允许
  213. Require all denied
  214. #设置结束用</Directory>指令结束
  215. </Directory>
  216. #
  217. # Note that from this point forward you must specifically allow
  218. # particular features to be enabled - so if something's not working as
  219. # you might expect, make sure that you have specifically enabled it
  220. # below.
  221. #
  222. #
  223. # DocumentRoot: The directory out of which you will serve your
  224. # documents. By default, all requests are taken from this directory, but
  225. # symbolic links and aliases may be used to point to other locations.
  226. #
  227. #使用DocumentRoot指定WEB站点的根目录
  228. DocumentRoot "/usr/local/apache/htdocs"
  229. #对默认网站根目录设置访问权限
  230. <Directory "/usr/local/apache/htdocs">
  231. #
  232. # Possible values for the Options directive are "None", "All",
  233. # or any combination of:
  234. # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  235. #
  236. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  237. # doesn't give it to you.
  238. #
  239. # The Options directive is both complicated and important. Please see
  240. # (http://httpd.apache.org/docs/2.4/mod/core.html#options)
  241. # for more information.
  242. #
  243. Options Indexes FollowSymLinks
  244. #Indexes 站点中有index页面优先加载
  245. #FollowSymLinks 在WEB站点根目录允许使用链接文件
  246. #
  247. # AllowOverride controls what directives may be placed in .htaccess files.
  248. # It can be "All", "None", or any combination of the keywords:
  249. # AllowOverride FileInfo AuthConfig Limit
  250. #
  251. #不许使用权限复写
  252. AllowOverride None
  253. #
  254. # Controls who can get stuff from this server.
  255. #
  256. #允许所有人访问网站根目录
  257. Require all granted
  258. </Directory>
  259. #
  260. # DirectoryIndex: sets the file that Apache will serve if a directory
  261. # is requested.
  262. #指定站点的默认索引文件
  263. <IfModule dir\_module>
  264. DirectoryIndex index.html
  265. </IfModule>
  266. #
  267. # The following lines prevent .htaccess and .htpasswd files from being
  268. # viewed by Web clients.
  269. #
  270. #是否允许在目录下使用.htaccess 和 .htpassswd文件设置客户端对网站目录访问权限
  271. #.htaccess 访问控制
  272. #.htpasswd 用户登陆验证
  273. #拒绝在目录下使用.ht开头的文件
  274. <Files ".ht\*">
  275. Require all denied
  276. </Files>
  277. #
  278. # ErrorLog: The location of the error log file.
  279. # If you do not specify an ErrorLog directive within a <VirtualHost>
  280. # container, error messages relating to that virtual host will be
  281. # logged here. If you *do* define an error logfile for a <VirtualHost>
  282. # container, that host's errors will be logged there and not here.
  283. #
  284. #错误日志
  285. ErrorLog "logs/error_log"
  286. #
  287. # LogLevel: Control the number of messages logged to the error\_log.
  288. # Possible values include: debug, info, notice, warn, error, crit,
  289. # alert, emerg.
  290. #
  291. #错误日志记录级别:debug, info, notice, warn, error, crit,alert, emerg.
  292. LogLevel warn
  293. #启用日志模块
  294. <IfModule log\_config\_module>
  295. #
  296. # The following directives define some format nicknames for use with
  297. # a CustomLog directive (see below).
  298. #
  299. #定义日志格式 LogFormat "日志格式" 日志格式名称
  300. LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  301. LogFormat "%h %l %u %t \"%r\" %&gt;s %b" common
  302. <IfModule logio\_module>
  303. # 在访问日志中记录每个请求的输入输出字节 %I input %O output
  304. # You need to enable mod\_logio.c to use %I and %O
  305. LogFormat "%h %l %u %t \"%r\" %&gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  306. </IfModule>
  307. #
  308. # The location and format of the access logfile (Common Logfile Format).
  309. # If you do not define any access logfiles within a &lt;VirtualHost&gt;
  310. # container, they will be logged here. Contrariwise, if you *do*
  311. # define per-<VirtualHost> access logfiles, transactions will be
  312. # logged therein and \*not\* in this file.
  313. #
  314. #定义访问日志路径及日志格式
  315. CustomLog "logs/access_log" common
  316. #
  317. # If you prefer a logfile with access, agent, and referer information
  318. # (Combined Logfile Format) you can use the following directive.
  319. #
  320. #CustomLog "logs/access_log" combined
  321. </IfModule>
  322. #使用目录映射
  323. <IfModule alias\_module>
  324. #
  325. # URL重定向
  326. # Redirect: Allows you to tell clients about documents that used to
  327. # exist in your server's namespace, but do not anymore. The client
  328. # will make a new request for the document at its new location.
  329. # Example:
  330. # Redirect permanent /foo http://www.example.com/bar
  331. #URL重定向 Redirect 方法 选项
  332. #不同机器重定向将访问http://IP/abc 的用户 重定向访问 http:/www.baidu.com
  333. Redirect permanent /abc http://www.baidu.com
  334. #本机内部URL重定向 http://IP/123 http://IP/7878 ==注意==:被重定向的目录必须存在 比如7878必须有
  335. Redirect permanent /123 /7878
  336. #seeother 表示改资源被替换过
  337. Redirect seeother /123 /7878
  338. #gone 表示改资源被移除了
  339. Redirect gone /123
  340. #permanent 永久重定向 301
  341. #temp 临时重定向
  342. #seeother 返回一个seeother状态码(303)提示这个资源被替代
  343. #gone 返回一个gone状态码(410)提示这个资源被永久删除了
  344. #
  345. # Alias: Maps web paths into filesystem paths and is used to
  346. # access content that does not live under the DocumentRoot.
  347. # Example:
  348. # Alias /webpath /full/filesystem/path
  349. #
  350. # If you include a trailing / on /webpath then the server will
  351. # require it to be present in the URL. You will also likely
  352. # need to provide a <Directory> section to allow access to
  353. # the filesystem path.
  354. #Alias 将URI中的没用了映射到文件系统目录(绝对路径)
  355. #比如将网站URL http://ip/abc 访问的/abc目录映射到文件系统/usr/local/apache/htdocs/7878
  356. Alias /abc /usr/local/apache/htdocs/7878
  357. #需要注意是文件系统路径
  358. #
  359. # ScriptAlias: This controls which directories contain server scripts.
  360. # ScriptAliases are essentially the same as Aliases, except that
  361. # documents in the target directory are treated as applications and
  362. # run by the server when requested rather than as documents sent to the
  363. # client. The same rules about trailing "/" apply to ScriptAlias
  364. # directives as to Alias.
  365. #
  366. ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
  367. #脚本目录别名
  368. </IfModule>
  369. #使用外部CGI守护进程执行CGI脚本
  370. <IfModule cgid_module>
  371. #
  372. # ScriptSock: On threaded servers, designate the path to the UNIX
  373. # socket used to communicate with the CGI daemon of mod\_cgid.
  374. #
  375. #Scriptsock cgisock
  376. </IfModule>
  377. #
  378. # "/usr/local/apache/cgi-bin" should be changed to whatever your ScriptAliased
  379. # CGI directory exists, if you have that configured.
  380. #
  381. #CGI目录的访问权限
  382. <Directory "/usr/local/apache/cgi-bin">
  383. AllowOverride None
  384. Options None
  385. Require all granted
  386. </Directory>
  387. #自定义http的请求头和响应头
  388. #RequestHeader 设置请求头 http://httpd.apache.org/docs/2.4/mod/mod_headers.html
  389. #Header 设置响应头 http://httpd.apache.org/docs/2.4/mod/mod_headers.html
  390. <IfModule headers\_module>
  391. #
  392. # Avoid passing HTTP\_PROXY environment to CGI's on this or any proxied
  393. # backend servers which have lingering "httpoxy" defects.
  394. # 'Proxy' request header is undefined by the IETF, not listed by IANA
  395. #
  396. RequestHeader unset Proxy early
  397. </IfModule>
  398. #将请求的文件扩展名与文件的行为(处理程序和筛选器)和内容(mime类型、语言、字符集和编码)相关联。
  399. #明确告诉apache 可以接受什么类型的文件
  400. <IfModule mime_module>
  401. #
  402. # TypesConfig points to the file containing the list of mappings from
  403. # filename extension to MIME-type.
  404. #
  405. TypesConfig conf/mime.types
  406. #
  407. # AddType allows you to add to or override the MIME configuration
  408. # file specified in TypesConfig for specific file types.
  409. #
  410. #AddType application/x-gzip .tgz
  411. #
  412. # AddEncoding allows you to have certain browsers uncompress
  413. # information on the fly. Note: Not all browsers support this.
  414. #
  415. #AddEncoding x-compress .Z
  416. #AddEncoding x-gzip .gz .tgz
  417. #
  418. # If the AddEncoding directives above are commented-out, then you
  419. # probably should define those extensions to indicate media types:
  420. #
  421. AddType application/x-compress .Z
  422. AddType application/x-gzip .gz .tgz
  423. #
  424. # AddHandler allows you to map certain file extensions to "handlers":
  425. # actions unrelated to filetype. These can be either built into the server
  426. # or added with the Action directive (see below)
  427. #
  428. # To use CGI scripts outside of ScriptAliased directories:
  429. # (You will also need to add "ExecCGI" to the "Options" directive.)
  430. #
  431. #AddHandler cgi-script .cgi
  432. # For type maps \(negotiated resources\):
  433. #AddHandler type-map var
  434. #
  435. # Filters allow you to process content before it is sent to the client.
  436. #
  437. # To parse .shtml files for server-side includes (SSI):
  438. # (You will also need to add "Includes" to the "Options" directive.)
  439. #
  440. #AddType text/html .shtml
  441. #AddOutputFilter INCLUDES .shtml
  442. </IfModule>
  443. #
  444. # The mod_mime_magic module allows the server to use various hints from the
  445. # contents of the file itself to determine its type. The MIMEMagicFile
  446. # directive tells the module where the hint definitions are located.
  447. #
  448. #MIMEMagicFile conf/magic
  449. #
  450. # Customizable error responses come in three flavors:
  451. # 1) plain text 2) local redirects 3) external redirects
  452. #
  453. # Some examples:
  454. #ErrorDocument 500 "The server made a boo boo."
  455. #ErrorDocument 404 /missing.html
  456. #ErrorDocument 404 "/cgi-bin/missing\_handler.pl"
  457. #ErrorDocument 402 [http://www.example.com/subscription\_info.html](http://www.example.com/subscription_info.html)
  458. #
  459. #
  460. # MaxRanges: Maximum number of Ranges in a request before
  461. # returning the entire resource, or one of the special
  462. # values 'default', 'none' or 'unlimited'.
  463. # Default setting is to accept 200 Ranges.
  464. #MaxRanges unlimited
  465. #
  466. # EnableMMAP and EnableSendfile: On systems that support it,
  467. # memory-mapping or the sendfile syscall may be used to deliver
  468. # files. This usually improves server performance, but must
  469. # be turned off when serving from networked-mounted
  470. # filesystems or if support for these functions is otherwise
  471. # broken on your system.
  472. # Defaults: EnableMMAP On, EnableSendfile Off
  473. #
  474. #EnableMMAP off
  475. #EnableSendfile on
  476. # Supplemental configuration
  477. #
  478. # The configuration files in the conf/extra/ directory can be
  479. # included to add extra features or to modify the default configuration of
  480. # the server, or you may simply copy their contents here and change as
  481. # necessary.
  482. #Include 包含子配置文件
  483. # Server-pool management \(MPM specific\)
  484. #Include conf/extra/httpd-mpm.conf
  485. # Multi-language error messages
  486. #Include conf/extra/httpd-multilang-errordoc.conf
  487. # Fancy directory listings
  488. #Include conf/extra/httpd-autoindex.conf
  489. # Language settings
  490. #Include conf/extra/httpd-languages.conf
  491. # User home directories
  492. #Include conf/extra/httpd-userdir.conf
  493. # Real-time info on requests and configuration
  494. #Include conf/extra/httpd-info.conf
  495. # Virtual hosts
  496. #Include conf/extra/httpd-vhosts.conf
  497. # Local access to the Apache HTTP Server Manual
  498. #Include conf/extra/httpd-manual.conf
  499. # Distributed authoring and versioning (WebDAV)
  500. #Include conf/extra/httpd-dav.conf
  501. # Various default settings
  502. #Include conf/extra/httpd-default.conf
  503. # Configure mod_proxy_html to understand HTML4/XHTML1
  504. #启动代理模块
  505. <IfModule proxy\_html_module>
  506. Include conf/extra/proxy-html.conf
  507. </IfModule>;
  508. # Secure (SSL/TLS) connections
  509. #Include conf/extra/httpd-ssl.conf
  510. #
  511. # Note: The following must must be present to support
  512. # starting without SSL on platforms with no /dev/random equivalent
  513. # but a statically compiled-in mod\_ssl.
  514. #
  515. #启用ssl模块
  516. <IfModule ssl_module>
  517. SSLRandomSeed startup builtin
  518. SSLRandomSeed connect builtin
  519. </IfModule>;

该分类下的相关小册推荐: