{"id":34751,"date":"2023-10-26T07:51:25","date_gmt":"2023-01-17T01:56:17","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/"},"modified":"2024-01-15T08:22:35","modified_gmt":"2024-01-15T00:22:35","slug":"apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/","title":{"rendered":"Apache 2.4.9 (Mac OS X 10.10 Yosemite)\u7684httpd.conf\u548chttpd-vhosts.conf"},"content":{"rendered":"<p>\u5982\u679c\u6ca1\u6709\u6ce8\u610f\u5230Apache\u7684\u7248\u672c\u5df2\u7ecf\u6539\u53d8\uff0c\u76f4\u63a5\u4eceOS X 10.9\u590d\u5236httpd.conf\u6587\u4ef6\u8fc7\u53bb\u5c06\u4f1a\u51fa\u73b0\u9519\u8bef\u3002<\/p>\n<p>\u4ece2.2\u5347\u7ea7\u52302.4<br \/>\nhttp:\/\/httpd.apache.org\/docs\/2.4\/upgrading.html<\/p>\n<p>\u5982\u679c\u80fd\u6b63\u786e\u5730\u8fdb\u884c\u6ce8\u91ca\u548c\u6a21\u5757\u52a0\u8f7d\uff0c\u5c31\u4e0d\u4f1a\u6709\u95ee\u9898\uff0c\u4f46\u6700\u597d\u662f\u4ee5Apache 2.4\u7684httpd.conf\u6587\u4ef6\u4e3a\u57fa\u7840\u91cd\u65b0\u5236\u4f5c\u3002<\/p>\n<p>\u8981\u786e\u8ba4 conf \u7684\u8bbe\u7f6e\u662f\u5426\u6b63\u786e\uff0c<br \/>\n\u5728\u7ec8\u7aef\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<br \/>\n$ apachectl configtest<\/p>\n<pre class=\"post-pre\"><code><span class=\"c\">#<\/span>\r\n<span class=\"c\"># This is the main Apache HTTP server configuration file.  It contains the<\/span>\r\n<span class=\"c\"># configuration directives that give the server its instructions.<\/span>\r\n<span class=\"c\"># See &lt;URL:http:\/\/httpd.apache.org\/docs\/2.4\/&gt; for detailed information.<\/span>\r\n<span class=\"c\"># In particular, see <\/span>\r\n<span class=\"c\"># &lt;URL:http:\/\/httpd.apache.org\/docs\/2.4\/mod\/directives.html&gt;<\/span>\r\n<span class=\"c\"># for a discussion of each configuration directive.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Do NOT simply read the instructions in here without understanding<\/span>\r\n<span class=\"c\"># what they do.  They're here only as hints or reminders.  If you are unsure<\/span>\r\n<span class=\"c\"># consult the online docs. You have been warned.  <\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Configuration and logfile names: If the filenames you specify for many<\/span>\r\n<span class=\"c\"># of the server's control files begin with \"\/\" (or \"drive:\/\" for Win32), the<\/span>\r\n<span class=\"c\"># server will use that explicit path.  If the filenames do *not* begin<\/span>\r\n<span class=\"c\"># with \"\/\", the value of ServerRoot is prepended -- so \"logs\/access_log\"<\/span>\r\n<span class=\"c\"># with ServerRoot set to \"\/usr\/local\/apache2\" will be interpreted by the<\/span>\r\n<span class=\"c\"># server as \"\/usr\/local\/apache2\/logs\/access_log\", whereas \"\/logs\/access_log\" <\/span>\r\n<span class=\"c\"># will be interpreted as '\/logs\/access_log'.<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># ServerRoot: The top of the directory tree under which the server's<\/span>\r\n<span class=\"c\"># configuration, error, and log files are kept.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Do not add a slash at the end of the directory path.  If you point<\/span>\r\n<span class=\"c\"># ServerRoot at a non-local disk, be sure to specify a local disk on the<\/span>\r\n<span class=\"c\"># Mutex directive, if file-based mutexes are used.  If you wish to share the<\/span>\r\n<span class=\"c\"># same ServerRoot for multiple httpd daemons, you will need to change at<\/span>\r\n<span class=\"c\"># least PidFile.<\/span>\r\n<span class=\"c\">#<\/span>\r\nServerRoot <span class=\"s2\">\"\/usr\"<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Mutex: Allows you to set the mutex mechanism and mutex file directory<\/span>\r\n<span class=\"c\"># for individual mutexes, or change the global defaults<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Uncomment and change the directory if mutexes are file-based and the default<\/span>\r\n<span class=\"c\"># mutex file directory is not on a local disk or is not appropriate for some<\/span>\r\n<span class=\"c\"># other reason.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Mutex default:\/private\/var\/run<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Listen: Allows you to bind Apache to specific IP addresses and\/or<\/span>\r\n<span class=\"c\"># ports, instead of the default. See also the &lt;VirtualHost&gt;<\/span>\r\n<span class=\"c\"># directive.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Change this to Listen on specific IP addresses as shown below to <\/span>\r\n<span class=\"c\"># prevent Apache from glomming onto all bound IP addresses.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\">#Listen 12.34.56.78:80<\/span>\r\nListen 80\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Dynamic Shared Object (DSO) Support<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># To be able to use the functionality of a module which was built as a DSO you<\/span>\r\n<span class=\"c\"># have to place corresponding `LoadModule' lines at this location so the<\/span>\r\n<span class=\"c\"># directives contained in it are actually available _before_ they are used.<\/span>\r\n<span class=\"c\"># Statically compiled modules (those listed by `httpd -l') do not need<\/span>\r\n<span class=\"c\"># to be loaded here.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Example:<\/span>\r\n<span class=\"c\"># LoadModule foo_module modules\/mod_foo.so<\/span>\r\n<span class=\"c\">#<\/span>\r\nLoadModule authn_file_module libexec\/apache2\/mod_authn_file.so\r\n<span class=\"c\">#LoadModule authn_dbm_module libexec\/apache2\/mod_authn_dbm.so<\/span>\r\n<span class=\"c\">#LoadModule authn_anon_module libexec\/apache2\/mod_authn_anon.so<\/span>\r\n<span class=\"c\">#LoadModule authn_dbd_module libexec\/apache2\/mod_authn_dbd.so<\/span>\r\n<span class=\"c\">#LoadModule authn_socache_module libexec\/apache2\/mod_authn_socache.so<\/span>\r\nLoadModule authn_core_module libexec\/apache2\/mod_authn_core.so\r\nLoadModule authz_host_module libexec\/apache2\/mod_authz_host.so\r\nLoadModule authz_groupfile_module libexec\/apache2\/mod_authz_groupfile.so\r\nLoadModule authz_user_module libexec\/apache2\/mod_authz_user.so\r\n<span class=\"c\">#LoadModule authz_dbm_module libexec\/apache2\/mod_authz_dbm.so<\/span>\r\n<span class=\"c\">#LoadModule authz_owner_module libexec\/apache2\/mod_authz_owner.so<\/span>\r\n<span class=\"c\">#LoadModule authz_dbd_module libexec\/apache2\/mod_authz_dbd.so<\/span>\r\nLoadModule authz_core_module libexec\/apache2\/mod_authz_core.so\r\n<span class=\"c\">#LoadModule authnz_ldap_module libexec\/apache2\/mod_authnz_ldap.so<\/span>\r\nLoadModule access_compat_module libexec\/apache2\/mod_access_compat.so\r\nLoadModule auth_basic_module libexec\/apache2\/mod_auth_basic.so\r\n<span class=\"c\">#LoadModule auth_form_module libexec\/apache2\/mod_auth_form.so<\/span>\r\n<span class=\"c\">#LoadModule auth_digest_module libexec\/apache2\/mod_auth_digest.so<\/span>\r\n<span class=\"c\">#LoadModule allowmethods_module libexec\/apache2\/mod_allowmethods.so<\/span>\r\n<span class=\"c\">#LoadModule file_cache_module libexec\/apache2\/mod_file_cache.so<\/span>\r\n<span class=\"c\">#LoadModule cache_module libexec\/apache2\/mod_cache.so<\/span>\r\n<span class=\"c\">#LoadModule cache_disk_module libexec\/apache2\/mod_cache_disk.so<\/span>\r\n<span class=\"c\">#LoadModule cache_socache_module libexec\/apache2\/mod_cache_socache.so<\/span>\r\n<span class=\"c\">#LoadModule socache_shmcb_module libexec\/apache2\/mod_socache_shmcb.so<\/span>\r\n<span class=\"c\">#LoadModule socache_dbm_module libexec\/apache2\/mod_socache_dbm.so<\/span>\r\n<span class=\"c\">#LoadModule socache_memcache_module libexec\/apache2\/mod_socache_memcache.so<\/span>\r\n<span class=\"c\">#LoadModule watchdog_module libexec\/apache2\/mod_watchdog.so<\/span>\r\n<span class=\"c\">#LoadModule macro_module libexec\/apache2\/mod_macro.so<\/span>\r\n<span class=\"c\">#LoadModule dbd_module libexec\/apache2\/mod_dbd.so<\/span>\r\n<span class=\"c\">#LoadModule dumpio_module libexec\/apache2\/mod_dumpio.so<\/span>\r\n<span class=\"c\">#LoadModule echo_module libexec\/apache2\/mod_echo.so<\/span>\r\n<span class=\"c\">#LoadModule buffer_module libexec\/apache2\/mod_buffer.so<\/span>\r\n<span class=\"c\">#LoadModule data_module libexec\/apache2\/mod_data.so<\/span>\r\n<span class=\"c\">#LoadModule ratelimit_module libexec\/apache2\/mod_ratelimit.so<\/span>\r\nLoadModule reqtimeout_module libexec\/apache2\/mod_reqtimeout.so\r\n<span class=\"c\">#LoadModule ext_filter_module libexec\/apache2\/mod_ext_filter.so<\/span>\r\n<span class=\"c\">#LoadModule request_module libexec\/apache2\/mod_request.so<\/span>\r\n<span class=\"c\">#LoadModule include_module libexec\/apache2\/mod_include.so<\/span>\r\nLoadModule filter_module libexec\/apache2\/mod_filter.so\r\n<span class=\"c\">#LoadModule reflector_module libexec\/apache2\/mod_reflector.so<\/span>\r\n<span class=\"c\">#LoadModule substitute_module libexec\/apache2\/mod_substitute.so<\/span>\r\n<span class=\"c\">#LoadModule sed_module libexec\/apache2\/mod_sed.so<\/span>\r\n<span class=\"c\">#LoadModule charset_lite_module libexec\/apache2\/mod_charset_lite.so<\/span>\r\n<span class=\"c\">#LoadModule deflate_module libexec\/apache2\/mod_deflate.so<\/span>\r\n<span class=\"c\">#LoadModule xml2enc_module libexec\/apache2\/mod_xml2enc.so<\/span>\r\n<span class=\"c\">#LoadModule proxy_html_module libexec\/apache2\/mod_proxy_html.so<\/span>\r\nLoadModule mime_module libexec\/apache2\/mod_mime.so\r\n<span class=\"c\">#LoadModule ldap_module libexec\/apache2\/mod_ldap.so<\/span>\r\nLoadModule log_config_module libexec\/apache2\/mod_log_config.so\r\n<span class=\"c\">#LoadModule log_debug_module libexec\/apache2\/mod_log_debug.so<\/span>\r\n<span class=\"c\">#LoadModule log_forensic_module libexec\/apache2\/mod_log_forensic.so<\/span>\r\n<span class=\"c\">#LoadModule logio_module libexec\/apache2\/mod_logio.so<\/span>\r\nLoadModule env_module libexec\/apache2\/mod_env.so\r\n<span class=\"c\">#LoadModule mime_magic_module libexec\/apache2\/mod_mime_magic.so<\/span>\r\n<span class=\"c\">#LoadModule expires_module libexec\/apache2\/mod_expires.so<\/span>\r\nLoadModule headers_module libexec\/apache2\/mod_headers.so\r\n<span class=\"c\">#LoadModule usertrack_module libexec\/apache2\/mod_usertrack.so<\/span>\r\n<span class=\"c\">##LoadModule unique_id_module libexec\/apache2\/mod_unique_id.so<\/span>\r\nLoadModule setenvif_module libexec\/apache2\/mod_setenvif.so\r\nLoadModule version_module libexec\/apache2\/mod_version.so\r\n<span class=\"c\">#LoadModule remoteip_module libexec\/apache2\/mod_remoteip.so<\/span>\r\nLoadModule proxy_module libexec\/apache2\/mod_proxy.so\r\nLoadModule proxy_connect_module libexec\/apache2\/mod_proxy_connect.so\r\nLoadModule proxy_ftp_module libexec\/apache2\/mod_proxy_ftp.so\r\nLoadModule proxy_http_module libexec\/apache2\/mod_proxy_http.so\r\nLoadModule proxy_fcgi_module libexec\/apache2\/mod_proxy_fcgi.so\r\nLoadModule proxy_scgi_module libexec\/apache2\/mod_proxy_scgi.so\r\n<span class=\"c\">#LoadModule proxy_fdpass_module libexec\/apache2\/mod_proxy_fdpass.so<\/span>\r\nLoadModule proxy_wstunnel_module libexec\/apache2\/mod_proxy_wstunnel.so\r\nLoadModule proxy_ajp_module libexec\/apache2\/mod_proxy_ajp.so\r\nLoadModule proxy_balancer_module libexec\/apache2\/mod_proxy_balancer.so\r\nLoadModule proxy_express_module libexec\/apache2\/mod_proxy_express.so\r\n<span class=\"c\">#LoadModule session_module libexec\/apache2\/mod_session.so<\/span>\r\n<span class=\"c\">#LoadModule session_cookie_module libexec\/apache2\/mod_session_cookie.so<\/span>\r\n<span class=\"c\">#LoadModule session_dbd_module libexec\/apache2\/mod_session_dbd.so<\/span>\r\nLoadModule slotmem_shm_module libexec\/apache2\/mod_slotmem_shm.so\r\n<span class=\"c\">#LoadModule slotmem_plain_module libexec\/apache2\/mod_slotmem_plain.so<\/span>\r\n<span class=\"c\">#LoadModule ssl_module libexec\/apache2\/mod_ssl.so<\/span>\r\n<span class=\"c\">#LoadModule dialup_module libexec\/apache2\/mod_dialup.so<\/span>\r\nLoadModule lbmethod_byrequests_module libexec\/apache2\/mod_lbmethod_byrequests.so\r\nLoadModule lbmethod_bytraffic_module libexec\/apache2\/mod_lbmethod_bytraffic.so\r\nLoadModule lbmethod_bybusyness_module libexec\/apache2\/mod_lbmethod_bybusyness.so\r\n<span class=\"c\">#LoadModule lbmethod_heartbeat_module libexec\/apache2\/mod_lbmethod_heartbeat.so<\/span>\r\nLoadModule unixd_module libexec\/apache2\/mod_unixd.so\r\n<span class=\"c\">#LoadModule heartbeat_module libexec\/apache2\/mod_heartbeat.so<\/span>\r\n<span class=\"c\">#LoadModule heartmonitor_module libexec\/apache2\/mod_heartmonitor.so<\/span>\r\n<span class=\"c\">#LoadModule dav_module libexec\/apache2\/mod_dav.so<\/span>\r\nLoadModule status_module libexec\/apache2\/mod_status.so\r\nLoadModule autoindex_module libexec\/apache2\/mod_autoindex.so\r\n<span class=\"c\">#LoadModule asis_module libexec\/apache2\/mod_asis.so<\/span>\r\n<span class=\"c\">#LoadModule info_module libexec\/apache2\/mod_info.so<\/span>\r\n<span class=\"c\">#LoadModule cgi_module libexec\/apache2\/mod_cgi.so<\/span>\r\n<span class=\"c\">#LoadModule dav_fs_module libexec\/apache2\/mod_dav_fs.so<\/span>\r\n<span class=\"c\">#LoadModule dav_lock_module libexec\/apache2\/mod_dav_lock.so<\/span>\r\n<span class=\"c\">#LoadModule vhost_alias_module libexec\/apache2\/mod_vhost_alias.so<\/span>\r\nLoadModule negotiation_module libexec\/apache2\/mod_negotiation.so\r\nLoadModule dir_module libexec\/apache2\/mod_dir.so\r\n<span class=\"c\">#LoadModule imagemap_module libexec\/apache2\/mod_imagemap.so<\/span>\r\n<span class=\"c\">#LoadModule actions_module libexec\/apache2\/mod_actions.so<\/span>\r\n<span class=\"c\">#LoadModule speling_module libexec\/apache2\/mod_speling.so<\/span>\r\n<span class=\"c\">#LoadModule userdir_module libexec\/apache2\/mod_userdir.so<\/span>\r\nLoadModule alias_module libexec\/apache2\/mod_alias.so\r\n<span class=\"c\">#LoadModule rewrite_module libexec\/apache2\/mod_rewrite.so<\/span>\r\n<span class=\"c\">#LoadModule php5_module libexec\/apache2\/libphp5.so<\/span>\r\n<span class=\"c\">#LoadModule hfs_apple_module libexec\/apache2\/mod_hfs_apple.so<\/span>\r\n\r\n&lt;IfModule unixd_module&gt;\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># If you wish httpd to run as a different user or group, you must run<\/span>\r\n<span class=\"c\"># httpd as root initially and it will switch.  <\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># User\/Group: The name (or #number) of the user\/group to run httpd as.<\/span>\r\n<span class=\"c\"># It is usually good practice to create a dedicated user and group for<\/span>\r\n<span class=\"c\"># running httpd, as with most system services.<\/span>\r\n<span class=\"c\">#<\/span>\r\nUser _www\r\nGroup _www\r\n\r\n&lt;\/IfModule&gt;\r\n\r\n<span class=\"c\"># 'Main' server configuration<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># The directives in this section set up the values used by the 'main'<\/span>\r\n<span class=\"c\"># server, which responds to any requests that aren't handled by a<\/span>\r\n<span class=\"c\"># &lt;VirtualHost&gt; definition.  These values also provide defaults for<\/span>\r\n<span class=\"c\"># any &lt;VirtualHost&gt; containers you may define later in the file.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># All of these directives may appear inside &lt;VirtualHost&gt; containers,<\/span>\r\n<span class=\"c\"># in which case these default settings will be overridden for the<\/span>\r\n<span class=\"c\"># virtual host being defined.<\/span>\r\n<span class=\"c\">#<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># ServerAdmin: Your address, where problems with the server should be<\/span>\r\n<span class=\"c\"># e-mailed.  This address appears on some server-generated pages, such<\/span>\r\n<span class=\"c\"># as error documents.  e.g. admin@your-domain.com<\/span>\r\n<span class=\"c\">#<\/span>\r\nServerAdmin you@example.com\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># ServerName gives the name and port that the server uses to identify itself.<\/span>\r\n<span class=\"c\"># This can often be determined automatically, but we recommend you specify<\/span>\r\n<span class=\"c\"># it explicitly to prevent problems during startup.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># If your host doesn't have a registered DNS name, enter its IP address here.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\">#ServerName www.example.com:80<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Deny access to the entirety of your server's filesystem. You must<\/span>\r\n<span class=\"c\"># explicitly permit access to web content directories in other <\/span>\r\n<span class=\"c\"># &lt;Directory&gt; blocks below.<\/span>\r\n<span class=\"c\">#<\/span>\r\n&lt;Directory \/&gt;\r\n    AllowOverride none\r\n    Require all denied\r\n&lt;\/Directory&gt;\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Note that from this point forward you must specifically allow<\/span>\r\n<span class=\"c\"># particular features to be enabled - so if something's not working as<\/span>\r\n<span class=\"c\"># you might expect, make sure that you have specifically enabled it<\/span>\r\n<span class=\"c\"># below.<\/span>\r\n<span class=\"c\">#<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># DocumentRoot: The directory out of which you will serve your<\/span>\r\n<span class=\"c\"># documents. By default, all requests are taken from this directory, but<\/span>\r\n<span class=\"c\"># symbolic links and aliases may be used to point to other locations.<\/span>\r\n<span class=\"c\">#<\/span>\r\nDocumentRoot <span class=\"s2\">\"\/Library\/WebServer\/Documents\"<\/span>\r\n&lt;Directory <span class=\"s2\">\"\/Library\/WebServer\/Documents\"<\/span><span class=\"o\">&gt;<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># Possible values for the Options directive are \"None\", \"All\",<\/span>\r\n    <span class=\"c\"># or any combination of:<\/span>\r\n    <span class=\"c\">#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># Note that \"MultiViews\" must be named *explicitly* --- \"Options All\"<\/span>\r\n    <span class=\"c\"># doesn't give it to you.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># The Options directive is both complicated and important.  Please see<\/span>\r\n    <span class=\"c\"># http:\/\/httpd.apache.org\/docs\/2.4\/mod\/core.html#options<\/span>\r\n    <span class=\"c\"># for more information.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    Options FollowSymLinks Multiviews\r\n    MultiviewsMatch Any\r\n\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># AllowOverride controls what directives may be placed in .htaccess files.<\/span>\r\n    <span class=\"c\"># It can be \"All\", \"None\", or any combination of the keywords:<\/span>\r\n    <span class=\"c\">#   AllowOverride FileInfo AuthConfig Limit<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    AllowOverride None\r\n\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># Controls who can get stuff from this server.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    Require all granted\r\n&lt;\/Directory&gt;\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># DirectoryIndex: sets the file that Apache will serve if a directory<\/span>\r\n<span class=\"c\"># is requested.<\/span>\r\n<span class=\"c\">#<\/span>\r\n&lt;IfModule dir_module&gt;\r\n    DirectoryIndex index.html\r\n&lt;\/IfModule&gt;\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># The following lines prevent .htaccess and .htpasswd files from being <\/span>\r\n<span class=\"c\"># viewed by Web clients. <\/span>\r\n<span class=\"c\">#<\/span>\r\n&lt;FilesMatch <span class=\"s2\">\"^<\/span><span class=\"se\">\\.<\/span><span class=\"s2\">([Hh][Tt]|[Dd][Ss]_[Ss])\"<\/span><span class=\"o\">&gt;<\/span>\r\n    Require all denied\r\n&lt;\/FilesMatch&gt;\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Apple specific filesystem protection.<\/span>\r\n<span class=\"c\">#<\/span>\r\n&lt;Files <span class=\"s2\">\"rsrc\"<\/span><span class=\"o\">&gt;<\/span>\r\n    Require all denied\r\n&lt;\/Files&gt;\r\n&lt;DirectoryMatch <span class=\"s2\">\".*<\/span><span class=\"se\">\\.\\.<\/span><span class=\"s2\">namedfork\"<\/span><span class=\"o\">&gt;<\/span>\r\n    Require all denied\r\n&lt;\/DirectoryMatch&gt;\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># ErrorLog: The location of the error log file.<\/span>\r\n<span class=\"c\"># If you do not specify an ErrorLog directive within a &lt;VirtualHost&gt;<\/span>\r\n<span class=\"c\"># container, error messages relating to that virtual host will be<\/span>\r\n<span class=\"c\"># logged here.  If you *do* define an error logfile for a &lt;VirtualHost&gt;<\/span>\r\n<span class=\"c\"># container, that host's errors will be logged there and not here.<\/span>\r\n<span class=\"c\">#<\/span>\r\nErrorLog <span class=\"s2\">\"\/private\/var\/log\/apache2\/error_log\"<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># LogLevel: Control the number of messages logged to the error_log.<\/span>\r\n<span class=\"c\"># Possible values include: debug, info, notice, warn, error, crit,<\/span>\r\n<span class=\"c\"># alert, emerg.<\/span>\r\n<span class=\"c\">#<\/span>\r\nLogLevel warn\r\n\r\n&lt;IfModule log_config_module&gt;\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># The following directives define some format nicknames for use with<\/span>\r\n    <span class=\"c\"># a CustomLog directive (see below).<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    LogFormat <span class=\"s2\">\"%h %l %u %t <\/span><span class=\"se\">\\\"<\/span><span class=\"s2\">%r<\/span><span class=\"se\">\\\"<\/span><span class=\"s2\"> %&gt;s %b <\/span><span class=\"se\">\\\"<\/span><span class=\"s2\">%{Referer}i<\/span><span class=\"se\">\\\"<\/span> <span class=\"se\">\\\"<\/span><span class=\"s2\">%{User-Agent}i<\/span><span class=\"se\">\\\"<\/span><span class=\"s2\">\"<\/span> combined\r\n    LogFormat <span class=\"s2\">\"%h %l %u %t <\/span><span class=\"se\">\\\"<\/span><span class=\"s2\">%r<\/span><span class=\"se\">\\\"<\/span><span class=\"s2\"> %&gt;s %b\"<\/span> common\r\n\r\n    &lt;IfModule logio_module&gt;\r\n      <span class=\"c\"># You need to enable mod_logio.c to use %I and %O<\/span>\r\n      LogFormat <span class=\"s2\">\"%h %l %u %t <\/span><span class=\"se\">\\\"<\/span><span class=\"s2\">%r<\/span><span class=\"se\">\\\"<\/span><span class=\"s2\"> %&gt;s %b <\/span><span class=\"se\">\\\"<\/span><span class=\"s2\">%{Referer}i<\/span><span class=\"se\">\\\"<\/span> <span class=\"se\">\\\"<\/span><span class=\"s2\">%{User-Agent}i<\/span><span class=\"se\">\\\"<\/span><span class=\"s2\"> %I %O\"<\/span> combinedio\r\n    &lt;\/IfModule&gt;\r\n\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># The location and format of the access logfile (Common Logfile Format).<\/span>\r\n    <span class=\"c\"># If you do not define any access logfiles within a &lt;VirtualHost&gt;<\/span>\r\n    <span class=\"c\"># container, they will be logged here.  Contrariwise, if you *do*<\/span>\r\n    <span class=\"c\"># define per-&lt;VirtualHost&gt; access logfiles, transactions will be<\/span>\r\n    <span class=\"c\"># logged therein and *not* in this file.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    CustomLog <span class=\"s2\">\"\/private\/var\/log\/apache2\/access_log\"<\/span> common\r\n\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># If you prefer a logfile with access, agent, and referer information<\/span>\r\n    <span class=\"c\"># (Combined Logfile Format) you can use the following directive.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\">#CustomLog \"\/private\/var\/log\/apache2\/access_log\" combined<\/span>\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule alias_module&gt;\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># Redirect: Allows you to tell clients about documents that used to <\/span>\r\n    <span class=\"c\"># exist in your server's namespace, but do not anymore. The client <\/span>\r\n    <span class=\"c\"># will make a new request for the document at its new location.<\/span>\r\n    <span class=\"c\"># Example:<\/span>\r\n    <span class=\"c\"># Redirect permanent \/foo http:\/\/www.example.com\/bar<\/span>\r\n\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># Alias: Maps web paths into filesystem paths and is used to<\/span>\r\n    <span class=\"c\"># access content that does not live under the DocumentRoot.<\/span>\r\n    <span class=\"c\"># Example:<\/span>\r\n    <span class=\"c\"># Alias \/webpath \/full\/filesystem\/path<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># If you include a trailing \/ on \/webpath then the server will<\/span>\r\n    <span class=\"c\"># require it to be present in the URL.  You will also likely<\/span>\r\n    <span class=\"c\"># need to provide a &lt;Directory&gt; section to allow access to<\/span>\r\n    <span class=\"c\"># the filesystem path.<\/span>\r\n\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># ScriptAlias: This controls which directories contain server scripts. <\/span>\r\n    <span class=\"c\"># ScriptAliases are essentially the same as Aliases, except that<\/span>\r\n    <span class=\"c\"># documents in the target directory are treated as applications and<\/span>\r\n    <span class=\"c\"># run by the server when requested rather than as documents sent to the<\/span>\r\n    <span class=\"c\"># client.  The same rules about trailing \"\/\" apply to ScriptAlias<\/span>\r\n    <span class=\"c\"># directives as to Alias.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    ScriptAliasMatch ^\/cgi-bin\/<span class=\"o\">((<\/span>?!<span class=\"o\">(<\/span>?i:webobjects<span class=\"o\">))<\/span>.<span class=\"k\">*<\/span><span class=\"nv\">$)<\/span> <span class=\"s2\">\"\/Library\/WebServer\/CGI-Executables\/<\/span><span class=\"nv\">$1<\/span><span class=\"s2\">\"<\/span>\r\n\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule cgid_module&gt;\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># ScriptSock: On threaded servers, designate the path to the UNIX<\/span>\r\n    <span class=\"c\"># socket used to communicate with the CGI daemon of mod_cgid.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\">#Scriptsock cgisock<\/span>\r\n&lt;\/IfModule&gt;\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># \"\/Library\/WebServer\/CGI-Executables\" should be changed to whatever your ScriptAliased<\/span>\r\n<span class=\"c\"># CGI directory exists, if you have that configured.<\/span>\r\n<span class=\"c\">#<\/span>\r\n&lt;Directory <span class=\"s2\">\"\/Library\/WebServer\/CGI-Executables\"<\/span><span class=\"o\">&gt;<\/span>\r\n    AllowOverride None\r\n    Options None\r\n    Require all granted\r\n&lt;\/Directory&gt;\r\n\r\n&lt;IfModule mime_module&gt;\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># TypesConfig points to the file containing the list of mappings from<\/span>\r\n    <span class=\"c\"># filename extension to MIME-type.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    TypesConfig \/private\/etc\/apache2\/mime.types\r\n\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># AddType allows you to add to or override the MIME configuration<\/span>\r\n    <span class=\"c\"># file specified in TypesConfig for specific file types.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\">#AddType application\/x-gzip .tgz<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># AddEncoding allows you to have certain browsers uncompress<\/span>\r\n    <span class=\"c\"># information on the fly. Note: Not all browsers support this.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\">#AddEncoding x-compress .Z<\/span>\r\n    <span class=\"c\">#AddEncoding x-gzip .gz .tgz<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># If the AddEncoding directives above are commented-out, then you<\/span>\r\n    <span class=\"c\"># probably should define those extensions to indicate media types:<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    AddType application\/x-compress .Z\r\n    AddType application\/x-gzip .gz .tgz\r\n\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># AddHandler allows you to map certain file extensions to \"handlers\":<\/span>\r\n    <span class=\"c\"># actions unrelated to filetype. These can be either built into the server<\/span>\r\n    <span class=\"c\"># or added with the Action directive (see below)<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># To use CGI scripts outside of ScriptAliased directories:<\/span>\r\n    <span class=\"c\"># (You will also need to add \"ExecCGI\" to the \"Options\" directive.)<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\">#AddHandler cgi-script .cgi<\/span>\r\n\r\n    <span class=\"c\"># For type maps (negotiated resources):<\/span>\r\n    <span class=\"c\">#AddHandler type-map var<\/span>\r\n\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># Filters allow you to process content before it is sent to the client.<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\"># To parse .shtml files for server-side includes (SSI):<\/span>\r\n    <span class=\"c\"># (You will also need to add \"Includes\" to the \"Options\" directive.)<\/span>\r\n    <span class=\"c\">#<\/span>\r\n    <span class=\"c\">#AddType text\/html .shtml<\/span>\r\n    <span class=\"c\">#AddOutputFilter INCLUDES .shtml<\/span>\r\n&lt;\/IfModule&gt;\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># The mod_mime_magic module allows the server to use various hints from the<\/span>\r\n<span class=\"c\"># contents of the file itself to determine its type.  The MIMEMagicFile<\/span>\r\n<span class=\"c\"># directive tells the module where the hint definitions are located.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\">#MIMEMagicFile \/private\/etc\/apache2\/magic<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Customizable error responses come in three flavors:<\/span>\r\n<span class=\"c\"># 1) plain text 2) local redirects 3) external redirects<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Some examples:<\/span>\r\n<span class=\"c\">#ErrorDocument 500 \"The server made a boo boo.\"<\/span>\r\n<span class=\"c\">#ErrorDocument 404 \/missing.html<\/span>\r\n<span class=\"c\">#ErrorDocument 404 \"\/cgi-bin\/missing_handler.pl\"<\/span>\r\n<span class=\"c\">#ErrorDocument 402 http:\/\/www.example.com\/subscription_info.html<\/span>\r\n<span class=\"c\">#<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># MaxRanges: Maximum number of Ranges in a request before<\/span>\r\n<span class=\"c\"># returning the entire resource, or one of the special<\/span>\r\n<span class=\"c\"># values 'default', 'none' or 'unlimited'.<\/span>\r\n<span class=\"c\"># Default setting is to accept 200 Ranges.<\/span>\r\n<span class=\"c\">#MaxRanges unlimited<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># EnableMMAP and EnableSendfile: On systems that support it, <\/span>\r\n<span class=\"c\"># memory-mapping or the sendfile syscall may be used to deliver<\/span>\r\n<span class=\"c\"># files.  This usually improves server performance, but must<\/span>\r\n<span class=\"c\"># be turned off when serving from networked-mounted <\/span>\r\n<span class=\"c\"># filesystems or if support for these functions is otherwise<\/span>\r\n<span class=\"c\"># broken on your system.<\/span>\r\n<span class=\"c\"># Defaults: EnableMMAP On, EnableSendfile Off<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\">#EnableMMAP off<\/span>\r\n<span class=\"c\">#EnableSendfile on<\/span>\r\n\r\nTraceEnable off\r\n\r\n<span class=\"c\"># Supplemental configuration<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># The configuration files in the \/private\/etc\/apache2\/extra\/ directory can be <\/span>\r\n<span class=\"c\"># included to add extra features or to modify the default configuration of <\/span>\r\n<span class=\"c\"># the server, or you may simply copy their contents here and change as <\/span>\r\n<span class=\"c\"># necessary.<\/span>\r\n\r\n<span class=\"c\"># Server-pool management (MPM specific)<\/span>\r\nInclude \/private\/etc\/apache2\/extra\/httpd-mpm.conf\r\n\r\n<span class=\"c\"># Multi-language error messages<\/span>\r\n<span class=\"c\">#Include \/private\/etc\/apache2\/extra\/httpd-multilang-errordoc.conf<\/span>\r\n\r\n<span class=\"c\"># Fancy directory listings<\/span>\r\nInclude \/private\/etc\/apache2\/extra\/httpd-autoindex.conf\r\n\r\n<span class=\"c\"># Language settings<\/span>\r\n<span class=\"c\">#Include \/private\/etc\/apache2\/extra\/httpd-languages.conf<\/span>\r\n\r\n<span class=\"c\"># User home directories<\/span>\r\n<span class=\"c\">#Include \/private\/etc\/apache2\/extra\/httpd-userdir.conf<\/span>\r\n\r\n<span class=\"c\"># Real-time info on requests and configuration<\/span>\r\n<span class=\"c\">#Include \/private\/etc\/apache2\/extra\/httpd-info.conf<\/span>\r\n\r\n<span class=\"c\"># Virtual hosts<\/span>\r\n<span class=\"c\">#Include \/private\/etc\/apache2\/extra\/httpd-vhosts.conf<\/span>\r\n\r\n<span class=\"c\"># Local access to the Apache HTTP Server Manual<\/span>\r\n<span class=\"c\">#Include \/private\/etc\/apache2\/extra\/httpd-manual.conf<\/span>\r\n\r\n<span class=\"c\"># Distributed authoring and versioning (WebDAV)<\/span>\r\n<span class=\"c\">#Include \/private\/etc\/apache2\/extra\/httpd-dav.conf<\/span>\r\n\r\n<span class=\"c\"># Various default settings<\/span>\r\n<span class=\"c\">#Include \/private\/etc\/apache2\/extra\/httpd-default.conf<\/span>\r\n\r\n<span class=\"c\"># Configure mod_proxy_html to understand HTML4\/XHTML1<\/span>\r\n&lt;IfModule proxy_html_module&gt;\r\nInclude \/private\/etc\/apache2\/extra\/proxy-html.conf\r\n&lt;\/IfModule&gt;\r\n\r\n<span class=\"c\"># Secure (SSL\/TLS) connections<\/span>\r\n<span class=\"c\">#Include \/private\/etc\/apache2\/extra\/httpd-ssl.conf<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Note: The following must must be present to support<\/span>\r\n<span class=\"c\">#       starting without SSL on platforms with no \/dev\/random equivalent<\/span>\r\n<span class=\"c\">#       but a statically compiled-in mod_ssl.<\/span>\r\n<span class=\"c\">#<\/span>\r\n&lt;IfModule ssl_module&gt;\r\nSSLRandomSeed startup <span class=\"nb\">builtin\r\n<\/span>SSLRandomSeed connect <span class=\"nb\">builtin<\/span>\r\n&lt;\/IfModule&gt;\r\n\r\nInclude \/private\/etc\/apache2\/other\/<span class=\"k\">*<\/span>.conf\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># uncomment out the below to deal with user agents that deliberately<\/span>\r\n<span class=\"c\"># violate open standards by misusing DNT (DNT *must* be a specific<\/span>\r\n<span class=\"c\"># end-user choice)<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\">#&lt;IfModule setenvif_module&gt;<\/span>\r\n<span class=\"c\">#BrowserMatch \"MSIE 10.0;\" bad_DNT<\/span>\r\n<span class=\"c\">#&lt;\/IfModule&gt;<\/span>\r\n<span class=\"c\">#&lt;IfModule headers_module&gt;<\/span>\r\n<span class=\"c\">#RequestHeader unset DNT env=bad_DNT<\/span>\r\n<span class=\"c\">#&lt;\/IfModule&gt;<\/span>\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code><span class=\"c\"># Virtual Hosts<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Required modules: mod_log_config<\/span>\r\n\r\n<span class=\"c\"># If you want to maintain multiple domains\/hostnames on your<\/span>\r\n<span class=\"c\"># machine you can setup VirtualHost containers for them. Most configurations<\/span>\r\n<span class=\"c\"># use only name-based virtual hosts so the server doesn't need to worry about<\/span>\r\n<span class=\"c\"># IP addresses. This is indicated by the asterisks in the directives below.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># Please see the documentation at <\/span>\r\n<span class=\"c\"># &lt;URL:http:\/\/httpd.apache.org\/docs\/2.4\/vhosts\/&gt;<\/span>\r\n<span class=\"c\"># for further details before you try to setup virtual hosts.<\/span>\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># You may use the command line option '-S' to verify your virtual host<\/span>\r\n<span class=\"c\"># configuration.<\/span>\r\n\r\n<span class=\"c\">#<\/span>\r\n<span class=\"c\"># VirtualHost example:<\/span>\r\n<span class=\"c\"># Almost any Apache directive may go into a VirtualHost container.<\/span>\r\n<span class=\"c\"># The first VirtualHost section is used for all requests that do not<\/span>\r\n<span class=\"c\"># match a ServerName or ServerAlias in any &lt;VirtualHost&gt; block.<\/span>\r\n<span class=\"c\">#<\/span>\r\n&lt;VirtualHost <span class=\"k\">*<\/span>:80&gt;\r\n    ServerAdmin webmaster@dummy-host.example.com\r\n    DocumentRoot <span class=\"s2\">\"\/usr\/docs\/dummy-host.example.com\"<\/span>\r\n    ServerName dummy-host.example.com\r\n    ServerAlias www.dummy-host.example.com\r\n    ErrorLog <span class=\"s2\">\"\/private\/var\/log\/apache2\/dummy-host.example.com-error_log\"<\/span>\r\n    CustomLog <span class=\"s2\">\"\/private\/var\/log\/apache2\/dummy-host.example.com-access_log\"<\/span> common\r\n&lt;\/VirtualHost&gt;\r\n\r\n&lt;VirtualHost <span class=\"k\">*<\/span>:80&gt;\r\n    ServerAdmin webmaster@dummy-host2.example.com\r\n    DocumentRoot <span class=\"s2\">\"\/usr\/docs\/dummy-host2.example.com\"<\/span>\r\n    ServerName dummy-host2.example.com\r\n    ErrorLog <span class=\"s2\">\"\/private\/var\/log\/apache2\/dummy-host2.example.com-error_log\"<\/span>\r\n    CustomLog <span class=\"s2\">\"\/private\/var\/log\/apache2\/dummy-host2.example.com-access_log\"<\/span> common\r\n&lt;\/VirtualHost&gt;\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u6ca1\u6709\u6ce8\u610f\u5230Apache\u7684\u7248\u672c\u5df2\u7ecf\u6539\u53d8\uff0c\u76f4\u63a5\u4eceOS X 10.9\u590d\u5236httpd.conf\u6587\u4ef6\u8fc7\u53bb\u5c06\u4f1a\u51fa\u73b0\u9519\u8bef [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34751","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Apache 2.4.9 (Mac OS X 10.10 Yosemite)\u7684httpd.conf\u548chttpd-vhosts.conf - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite\u7684httpd-conf\u548chttpd-vhosts-conf\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apache 2.4.9 (Mac OS X 10.10 Yosemite)\u7684httpd.conf\u548chttpd-vhosts.conf\" \/>\n<meta property=\"og:description\" content=\"\u5982\u679c\u6ca1\u6709\u6ce8\u610f\u5230Apache\u7684\u7248\u672c\u5df2\u7ecf\u6539\u53d8\uff0c\u76f4\u63a5\u4eceOS X 10.9\u590d\u5236httpd.conf\u6587\u4ef6\u8fc7\u53bb\u5c06\u4f1a\u51fa\u73b0\u9519\u8bef [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite\u7684httpd-conf\u548chttpd-vhosts-conf\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-17T01:56:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-15T00:22:35+00:00\" \/>\n<meta name=\"author\" content=\"\u79d1, \u9896\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u9896\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/\",\"name\":\"Apache 2.4.9 (Mac OS X 10.10 Yosemite)\u7684httpd.conf\u548chttpd-vhosts.conf - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-01-17T01:56:17+00:00\",\"dateModified\":\"2024-01-15T00:22:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apache 2.4.9 (Mac OS X 10.10 Yosemite)\u7684httpd.conf\u548chttpd-vhosts.conf\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e\",\"name\":\"\u79d1, \u9896\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u9896\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Apache 2.4.9 (Mac OS X 10.10 Yosemite)\u7684httpd.conf\u548chttpd-vhosts.conf - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite\u7684httpd-conf\u548chttpd-vhosts-conf\/","og_locale":"zh_CN","og_type":"article","og_title":"Apache 2.4.9 (Mac OS X 10.10 Yosemite)\u7684httpd.conf\u548chttpd-vhosts.conf","og_description":"\u5982\u679c\u6ca1\u6709\u6ce8\u610f\u5230Apache\u7684\u7248\u672c\u5df2\u7ecf\u6539\u53d8\uff0c\u76f4\u63a5\u4eceOS X 10.9\u590d\u5236httpd.conf\u6587\u4ef6\u8fc7\u53bb\u5c06\u4f1a\u51fa\u73b0\u9519\u8bef [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite\u7684httpd-conf\u548chttpd-vhosts-conf\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-01-17T01:56:17+00:00","article_modified_time":"2024-01-15T00:22:35+00:00","author":"\u79d1, \u9896","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u9896","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"16 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/","name":"Apache 2.4.9 (Mac OS X 10.10 Yosemite)\u7684httpd.conf\u548chttpd-vhosts.conf - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-01-17T01:56:17+00:00","dateModified":"2024-01-15T00:22:35+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"Apache 2.4.9 (Mac OS X 10.10 Yosemite)\u7684httpd.conf\u548chttpd-vhosts.conf"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/8ca01ba7f7362ad4edb7da206a12f29e","name":"\u79d1, \u9896","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8a6fb3cc7ba2f69d2189ba532aec4633ea7ed75ac0af162ec367cb3abc0fb2af?s=96&d=mm&r=g","caption":"\u79d1, \u9896"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keying\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/apache-2-4-9-mac-os-x-10-10-yosemite%e7%9a%84httpd-conf%e5%92%8chttpd-vhosts-conf\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=34751"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34751\/revisions"}],"predecessor-version":[{"id":57741,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34751\/revisions\/57741"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=34751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=34751"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=34751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}