{"id":34701,"date":"2023-01-18T18:04:17","date_gmt":"2023-01-29T05:25:42","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/"},"modified":"2024-04-29T10:26:04","modified_gmt":"2024-04-29T02:26:04","slug":"php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/","title":{"rendered":"PHP\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<h1>\u76f4\u63a5\u770b\u4e00\u4e0b httpd.conf<\/h1>\n<h2>\u4ee5\u4e0b\u5185\u5bb9\u5f88\u91cd\u8981\u3002<\/h2>\n<pre class=\"post-pre\"><code>ServerRoot \"c:\\Apache24\"\r\nListen 80\r\n#LoadModule xml2enc_module modules\/mod_xml2enc.so\r\nLoadModule php7_module \"c:\\php\\php7apache2_4.dll\"\r\n\r\nphp8\u306e\u5834\u5408\r\nLoadModule php_module \"c:\\php\\php8apache2_4.dll\"\r\n\r\n&lt;Directory \/&gt;\r\n    AllowOverride none\r\n    Require all denied\r\n&lt;\/Directory&gt;\r\n\r\nDocumentRoot \"C:\\Apache24\\htdocs\"\r\n&lt;Directory \"C:\/Apache24\/htdocs\"&gt;\r\n    #\r\n    # Possible values for the Options directive are \"None\", \"All\",\r\n<\/code><\/pre>\n<p>\u8bf7\u5728\u6700\u540e\u4e00\u884c\u6dfb\u52a0\u4ee5\u4e0b\u5185\u5bb9<\/p>\n<pre class=\"post-pre\"><code>php7\u306e\u5834\u5408\r\n&lt;IfModule php7_module&gt;\r\n    PHPINIDir \"c:\\php\"\r\n&lt;\/IfModule&gt;\r\n&lt;FilesMatch \"\\.php$\"&gt;\r\n  AddHandler php7-script .php\r\n  AddType application\/x-httpd-php .php\r\n&lt;\/FilesMatch&gt;\r\n\r\nphp8\u306e\u5834\u5408\r\n&lt;IfModule php8_module&gt;\r\n    PHPINIDir \"c:\\php\"\r\n&lt;\/IfModule&gt;\r\n&lt;FilesMatch \"\\.php$\"&gt;\r\n  AddHandler php-script .php\r\n  AddType application\/x-httpd-php .php\r\n&lt;\/FilesMatch&gt;\r\n\r\n<\/code><\/pre>\n<p>\u2605\u8bf7\u53c2\u8003 httpd.conf \u6587\u4ef6\u7684\u914d\u7f6e\u3002<\/p>\n<pre class=\"post-pre\"><code>#\r\n# This is the main Apache HTTP server configuration file.  It contains the\r\n# configuration directives that give the server its instructions.\r\n# See &lt;URL:http:\/\/httpd.apache.org\/docs\/2.4\/&gt; for detailed information.\r\n# In particular, see \r\n# &lt;URL:http:\/\/httpd.apache.org\/docs\/2.4\/mod\/directives.html&gt;\r\n# for a discussion of each configuration directive.\r\n#\r\n# Do NOT simply read the instructions in here without understanding\r\n# what they do.  They're here only as hints or reminders.  If you are unsure\r\n# consult the online docs. You have been warned.  \r\n#\r\n# Configuration and logfile names: If the filenames you specify for many\r\n# of the server's control files begin with \"\/\" (or \"drive:\/\" for Win32), the\r\n# server will use that explicit path.  If the filenames do *not* begin\r\n# with \"\/\", the value of ServerRoot is prepended -- so \"logs\/access_log\"\r\n# with ServerRoot set to \"\/usr\/local\/apache2\" will be interpreted by the\r\n# server as \"\/usr\/local\/apache2\/logs\/access_log\", whereas \"\/logs\/access_log\" \r\n# will be interpreted as '\/logs\/access_log'.\r\n#\r\n# NOTE: Where filenames are specified, you must use forward slashes\r\n# instead of backslashes (e.g., \"c:\/apache\" instead of \"c:\\apache\").\r\n# If a drive letter is omitted, the drive on which httpd.exe is located\r\n# will be used by default.  It is recommended that you always supply\r\n# an explicit drive letter in absolute paths to avoid confusion.\r\n\r\n#\r\n# ServerRoot: The top of the directory tree under which the server's\r\n# configuration, error, and log files are kept.\r\n#\r\n# Do not add a slash at the end of the directory path.  If you point\r\n# ServerRoot at a non-local disk, be sure to specify a local disk on the\r\n# Mutex directive, if file-based mutexes are used.  If you wish to share the\r\n# same ServerRoot for multiple httpd daemons, you will need to change at\r\n# least PidFile.\r\n#\r\n\r\nServerRoot \"c:\\Apache24\"\r\n\r\n#\r\n# Mutex: Allows you to set the mutex mechanism and mutex file directory\r\n# for individual mutexes, or change the global defaults\r\n#\r\n# Uncomment and change the directory if mutexes are file-based and the default\r\n# mutex file directory is not on a local disk or is not appropriate for some\r\n# other reason.\r\n#\r\n# Mutex default:logs\r\n\r\n#\r\n# Listen: Allows you to bind Apache to specific IP addresses and\/or\r\n# ports, instead of the default. See also the &lt;VirtualHost&gt;\r\n# directive.\r\n#\r\n# Change this to Listen on specific IP addresses as shown below to \r\n# prevent Apache from glomming onto all bound IP addresses.\r\n#\r\n#Listen 12.34.56.78:80\r\nListen 80\r\n\r\n#\r\n# Dynamic Shared Object (DSO) Support\r\n#\r\n# To be able to use the functionality of a module which was built as a DSO you\r\n# have to place corresponding `LoadModule' lines at this location so the\r\n# directives contained in it are actually available _before_ they are used.\r\n# Statically compiled modules (those listed by `httpd -l') do not need\r\n# to be loaded here.\r\n#\r\n# Example:\r\n# LoadModule foo_module modules\/mod_foo.so\r\n#\r\nLoadModule access_compat_module modules\/mod_access_compat.so\r\nLoadModule actions_module modules\/mod_actions.so\r\nLoadModule alias_module modules\/mod_alias.so\r\nLoadModule allowmethods_module modules\/mod_allowmethods.so\r\nLoadModule asis_module modules\/mod_asis.so\r\nLoadModule auth_basic_module modules\/mod_auth_basic.so\r\n#LoadModule auth_digest_module modules\/mod_auth_digest.so\r\n#LoadModule auth_form_module modules\/mod_auth_form.so\r\n#LoadModule authn_anon_module modules\/mod_authn_anon.so\r\nLoadModule authn_core_module modules\/mod_authn_core.so\r\n#LoadModule authn_dbd_module modules\/mod_authn_dbd.so\r\n#LoadModule authn_dbm_module modules\/mod_authn_dbm.so\r\nLoadModule authn_file_module modules\/mod_authn_file.so\r\n#LoadModule authn_socache_module modules\/mod_authn_socache.so\r\n#LoadModule authnz_fcgi_module modules\/mod_authnz_fcgi.so\r\n#LoadModule authnz_ldap_module modules\/mod_authnz_ldap.so\r\nLoadModule authz_core_module modules\/mod_authz_core.so\r\n#LoadModule authz_dbd_module modules\/mod_authz_dbd.so\r\n#LoadModule authz_dbm_module modules\/mod_authz_dbm.so\r\nLoadModule authz_groupfile_module modules\/mod_authz_groupfile.so\r\nLoadModule authz_host_module modules\/mod_authz_host.so\r\n#LoadModule authz_owner_module modules\/mod_authz_owner.so\r\nLoadModule authz_user_module modules\/mod_authz_user.so\r\nLoadModule autoindex_module modules\/mod_autoindex.so\r\n#LoadModule buffer_module modules\/mod_buffer.so\r\n#LoadModule cache_module modules\/mod_cache.so\r\n#LoadModule cache_disk_module modules\/mod_cache_disk.so\r\n#LoadModule cache_socache_module modules\/mod_cache_socache.so\r\n#LoadModule cern_meta_module modules\/mod_cern_meta.so\r\nLoadModule cgi_module modules\/mod_cgi.so\r\n#LoadModule charset_lite_module modules\/mod_charset_lite.so\r\n#LoadModule data_module modules\/mod_data.so\r\n#LoadModule dav_module modules\/mod_dav.so\r\n#LoadModule dav_fs_module modules\/mod_dav_fs.so\r\n#LoadModule dav_lock_module modules\/mod_dav_lock.so\r\n#LoadModule dbd_module modules\/mod_dbd.so\r\n#LoadModule deflate_module modules\/mod_deflate.so\r\nLoadModule dir_module modules\/mod_dir.so\r\n#LoadModule dumpio_module modules\/mod_dumpio.so\r\nLoadModule env_module modules\/mod_env.so\r\n#LoadModule expires_module modules\/mod_expires.so\r\n#LoadModule ext_filter_module modules\/mod_ext_filter.so\r\n#LoadModule file_cache_module modules\/mod_file_cache.so\r\n#LoadModule filter_module modules\/mod_filter.so\r\n#LoadModule http2_module modules\/mod_http2.so\r\n#LoadModule headers_module modules\/mod_headers.so\r\n#LoadModule heartbeat_module modules\/mod_heartbeat.so\r\n#LoadModule heartmonitor_module modules\/mod_heartmonitor.so\r\n#LoadModule ident_module modules\/mod_ident.so\r\n#LoadModule imagemap_module modules\/mod_imagemap.so\r\nLoadModule include_module modules\/mod_include.so\r\n#LoadModule info_module modules\/mod_info.so\r\nLoadModule isapi_module modules\/mod_isapi.so\r\n#LoadModule lbmethod_bybusyness_module modules\/mod_lbmethod_bybusyness.so\r\n#LoadModule lbmethod_byrequests_module modules\/mod_lbmethod_byrequests.so\r\n#LoadModule lbmethod_bytraffic_module modules\/mod_lbmethod_bytraffic.so\r\n#LoadModule lbmethod_heartbeat_module modules\/mod_lbmethod_heartbeat.so\r\n#LoadModule ldap_module modules\/mod_ldap.so\r\n#LoadModule logio_module modules\/mod_logio.so\r\nLoadModule log_config_module modules\/mod_log_config.so\r\n#LoadModule log_debug_module modules\/mod_log_debug.so\r\n#LoadModule log_forensic_module modules\/mod_log_forensic.so\r\n#LoadModule lua_module modules\/mod_lua.so\r\n#LoadModule macro_module modules\/mod_macro.so\r\nLoadModule mime_module modules\/mod_mime.so\r\n#LoadModule mime_magic_module modules\/mod_mime_magic.so\r\nLoadModule negotiation_module modules\/mod_negotiation.so\r\n#LoadModule proxy_module modules\/mod_proxy.so\r\n#LoadModule proxy_ajp_module modules\/mod_proxy_ajp.so\r\n#LoadModule proxy_balancer_module modules\/mod_proxy_balancer.so\r\n#LoadModule proxy_connect_module modules\/mod_proxy_connect.so\r\n#LoadModule proxy_express_module modules\/mod_proxy_express.so\r\n#LoadModule proxy_fcgi_module modules\/mod_proxy_fcgi.so\r\n#LoadModule proxy_ftp_module modules\/mod_proxy_ftp.so\r\n#LoadModule proxy_hcheck_module modules\/mod_proxy_hcheck.so\r\n#LoadModule proxy_html_module modules\/mod_proxy_html.so\r\n#LoadModule proxy_http_module modules\/mod_proxy_http.so\r\n#LoadModule proxy_http2_module modules\/mod_proxy_http2.so\r\n#LoadModule proxy_scgi_module modules\/mod_proxy_scgi.so\r\n#LoadModule proxy_wstunnel_module modules\/mod_proxy_wstunnel.so\r\n#LoadModule ratelimit_module modules\/mod_ratelimit.so\r\n#LoadModule reflector_module modules\/mod_reflector.so\r\n#LoadModule remoteip_module modules\/mod_remoteip.so\r\n#LoadModule request_module modules\/mod_request.so\r\n#LoadModule reqtimeout_module modules\/mod_reqtimeout.so\r\n#LoadModule rewrite_module modules\/mod_rewrite.so\r\n#LoadModule sed_module modules\/mod_sed.so\r\n#LoadModule session_module modules\/mod_session.so\r\n#LoadModule session_cookie_module modules\/mod_session_cookie.so\r\n#LoadModule session_crypto_module modules\/mod_session_crypto.so\r\n#LoadModule session_dbd_module modules\/mod_session_dbd.so\r\nLoadModule setenvif_module modules\/mod_setenvif.so\r\n#LoadModule slotmem_plain_module modules\/mod_slotmem_plain.so\r\n#LoadModule slotmem_shm_module modules\/mod_slotmem_shm.so\r\n#LoadModule socache_dbm_module modules\/mod_socache_dbm.so\r\n#LoadModule socache_memcache_module modules\/mod_socache_memcache.so\r\n#LoadModule socache_shmcb_module modules\/mod_socache_shmcb.so\r\n#LoadModule speling_module modules\/mod_speling.so\r\n#LoadModule ssl_module modules\/mod_ssl.so\r\n#LoadModule status_module modules\/mod_status.so\r\n#LoadModule substitute_module modules\/mod_substitute.so\r\n#LoadModule unique_id_module modules\/mod_unique_id.so\r\n#LoadModule userdir_module modules\/mod_userdir.so\r\n#LoadModule usertrack_module modules\/mod_usertrack.so\r\n#LoadModule version_module modules\/mod_version.so\r\n#LoadModule vhost_alias_module modules\/mod_vhost_alias.so\r\n#LoadModule watchdog_module modules\/mod_watchdog.so\r\n#LoadModule xml2enc_module modules\/mod_xml2enc.so\r\nLoadModule php7_module \"c:\\php\\php7apache2_4.dll\"\r\n\r\n&lt;IfModule unixd_module&gt;\r\n#\r\n# If you wish httpd to run as a different user or group, you must run\r\n# httpd as root initially and it will switch.  \r\n#\r\n# User\/Group: The name (or #number) of the user\/group to run httpd as.\r\n# It is usually good practice to create a dedicated user and group for\r\n# running httpd, as with most system services.\r\n#\r\nUser daemon\r\nGroup daemon\r\n\r\n&lt;\/IfModule&gt;\r\n\r\n# 'Main' server configuration\r\n#\r\n# The directives in this section set up the values used by the 'main'\r\n# server, which responds to any requests that aren't handled by a\r\n# &lt;VirtualHost&gt; definition.  These values also provide defaults for\r\n# any &lt;VirtualHost&gt; containers you may define later in the file.\r\n#\r\n# All of these directives may appear inside &lt;VirtualHost&gt; containers,\r\n# in which case these default settings will be overridden for the\r\n# virtual host being defined.\r\n#\r\n\r\n#\r\n# ServerAdmin: Your address, where problems with the server should be\r\n# e-mailed.  This address appears on some server-generated pages, such\r\n# as error documents.  e.g. admin@your-domain.com\r\n#\r\nServerAdmin admin@example.com\r\n\r\n#\r\n# ServerName gives the name and port that the server uses to identify itself.\r\n# This can often be determined automatically, but we recommend you specify\r\n# it explicitly to prevent problems during startup.\r\n#\r\n# If your host doesn't have a registered DNS name, enter its IP address here.\r\n#\r\n#ServerName www.example.com:80\r\n\r\n#\r\n# Deny access to the entirety of your server's filesystem. You must\r\n# explicitly permit access to web content directories in other \r\n# &lt;Directory&gt; blocks below.\r\n#\r\n&lt;Directory \/&gt;\r\n    AllowOverride none\r\n    Require all denied\r\n&lt;\/Directory&gt;\r\n\r\n#\r\n# Note that from this point forward you must specifically allow\r\n# particular features to be enabled - so if something's not working as\r\n# you might expect, make sure that you have specifically enabled it\r\n# below.\r\n#\r\n\r\n#\r\n# DocumentRoot: The directory out of which you will serve your\r\n# documents. By default, all requests are taken from this directory, but\r\n# symbolic links and aliases may be used to point to other locations.\r\n#\r\n\r\n# for symfony\r\n#DocumentRoot \"C:\/development\/sfprojects\/jobeet\/web\"\r\n\r\nDocumentRoot \"C:\\Apache24\\htdocs\"\r\n\r\n#DocumentRoot \"C:\\Apache24\\htdocs\\blog\"\r\n\r\n# for symfony\r\n#&lt;Directory \"C:\/development\/sfprojects\/jobeet\/web\"&gt;\r\n\r\n# for symfony 2022\/11\/05\r\n#&lt;Directory \"C:\/development\/sfprojects\/jobeet\/web\"&gt;\r\n\r\n&lt;Directory \"C:\/Apache24\/htdocs\"&gt;\r\n    #\r\n    # Possible values for the Options directive are \"None\", \"All\",\r\n    # or any combination of:\r\n    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews\r\n    #\r\n    # Note that \"MultiViews\" must be named *explicitly* --- \"Options All\"\r\n    # doesn't give it to you.\r\n    #\r\n    # The Options directive is both complicated and important.  Please see\r\n    # http:\/\/httpd.apache.org\/docs\/2.4\/mod\/core.html#options\r\n    # for more information.\r\n    #\r\n    Options Indexes FollowSymLinks\r\n\r\n    #\r\n    # AllowOverride controls what directives may be placed in .htaccess files.\r\n    # It can be \"All\", \"None\", or any combination of the keywords:\r\n    #   AllowOverride FileInfo AuthConfig Limit\r\n    #\r\n\r\n\t\tDirectoryIndex index.php\r\n    AllowOverride All\r\n    Allow from All\r\n\r\n    #\r\n    # Controls who can get stuff from this server.\r\n    #\r\n    Require all granted\r\n&lt;\/Directory&gt;\r\n\r\n#\r\n# DirectoryIndex: sets the file that Apache will serve if a directory\r\n# is requested.\r\n#\r\n&lt;IfModule dir_module&gt;\r\n    DirectoryIndex index.html\r\n&lt;\/IfModule&gt;\r\n\r\n#\r\n# The following lines prevent .htaccess and .htpasswd files from being \r\n# viewed by Web clients. \r\n#\r\n&lt;Files \".ht*\"&gt;\r\n    Require all denied\r\n&lt;\/Files&gt;\r\n\r\n#\r\n# ErrorLog: The location of the error log file.\r\n# If you do not specify an ErrorLog directive within a &lt;VirtualHost&gt;\r\n# container, error messages relating to that virtual host will be\r\n# logged here.  If you *do* define an error logfile for a &lt;VirtualHost&gt;\r\n# container, that host's errors will be logged there and not here.\r\n#\r\nErrorLog \"logs\/error.log\"\r\n\r\n#\r\n# LogLevel: Control the number of messages logged to the error_log.\r\n# Possible values include: debug, info, notice, warn, error, crit,\r\n# alert, emerg.\r\n#\r\nLogLevel warn\r\n\r\n&lt;IfModule log_config_module&gt;\r\n    #\r\n    # The following directives define some format nicknames for use with\r\n    # a CustomLog directive (see below).\r\n    #\r\n    LogFormat \"%h %l %u %t \\\"%r\\\" %&gt;s %b \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\"\" combined\r\n    LogFormat \"%h %l %u %t \\\"%r\\\" %&gt;s %b\" common\r\n\r\n    &lt;IfModule logio_module&gt;\r\n      # You need to enable mod_logio.c to use %I and %O\r\n      LogFormat \"%h %l %u %t \\\"%r\\\" %&gt;s %b \\\"%{Referer}i\\\" \\\"%{User-Agent}i\\\" %I %O\" combinedio\r\n    &lt;\/IfModule&gt;\r\n\r\n    #\r\n    # The location and format of the access logfile (Common Logfile Format).\r\n    # If you do not define any access logfiles within a &lt;VirtualHost&gt;\r\n    # container, they will be logged here.  Contrariwise, if you *do*\r\n    # define per-&lt;VirtualHost&gt; access logfiles, transactions will be\r\n    # logged therein and *not* in this file.\r\n    #\r\n    CustomLog \"logs\/access.log\" common\r\n\r\n    #\r\n    # If you prefer a logfile with access, agent, and referer information\r\n    # (Combined Logfile Format) you can use the following directive.\r\n    #\r\n    #CustomLog \"logs\/access.log\" combined\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule alias_module&gt;\r\n    #\r\n    # Redirect: Allows you to tell clients about documents that used to \r\n    # exist in your server's namespace, but do not anymore. The client \r\n    # will make a new request for the document at its new location.\r\n    # Example:\r\n    # Redirect permanent \/foo http:\/\/www.example.com\/bar\r\n\r\n    #\r\n    # Alias: Maps web paths into filesystem paths and is used to\r\n    # access content that does not live under the DocumentRoot.\r\n    # Example:\r\n    # Alias \/webpath \/full\/filesystem\/path\r\n    #\r\n    # If you include a trailing \/ on \/webpath then the server will\r\n    # require it to be present in the URL.  You will also likely\r\n    # need to provide a &lt;Directory&gt; section to allow access to\r\n    # the filesystem path.\r\n\r\n    #\r\n    # ScriptAlias: This controls which directories contain server scripts. \r\n    # ScriptAliases are essentially the same as Aliases, except that\r\n    # documents in the target directory are treated as applications and\r\n    # run by the server when requested rather than as documents sent to the\r\n    # client.  The same rules about trailing \"\/\" apply to ScriptAlias\r\n    # directives as to Alias.\r\n    #\r\n    ScriptAlias \/cgi-bin\/ \"c:\/Apache24\/cgi-bin\/\"\r\n\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule cgid_module&gt;\r\n    #\r\n    # ScriptSock: On threaded servers, designate the path to the UNIX\r\n    # socket used to communicate with the CGI daemon of mod_cgid.\r\n    #\r\n    #Scriptsock cgisock\r\n&lt;\/IfModule&gt;\r\n\r\n#\r\n# \"c:\/Apache24\/cgi-bin\" should be changed to whatever your ScriptAliased\r\n# CGI directory exists, if you have that configured.\r\n#\r\n&lt;Directory \"c:\/Apache24\/cgi-bin\"&gt;\r\n    AllowOverride None\r\n    Options None\r\n    Require all granted\r\n&lt;\/Directory&gt;\r\n\r\n&lt;IfModule headers_module&gt;\r\n    #\r\n    # Avoid passing HTTP_PROXY environment to CGI's on this or any proxied\r\n    # backend servers which have lingering \"httpoxy\" defects.\r\n    # 'Proxy' request header is undefined by the IETF, not listed by IANA\r\n    #\r\n    RequestHeader unset Proxy early\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule mime_module&gt;\r\n    #\r\n    # TypesConfig points to the file containing the list of mappings from\r\n    # filename extension to MIME-type.\r\n    #\r\n    TypesConfig conf\/mime.types\r\n\r\n    #\r\n    # AddType allows you to add to or override the MIME configuration\r\n    # file specified in TypesConfig for specific file types.\r\n    #\r\n    #AddType application\/x-gzip .tgz\r\n    #\r\n    # AddEncoding allows you to have certain browsers uncompress\r\n    # information on the fly. Note: Not all browsers support this.\r\n    #\r\n    #AddEncoding x-compress .Z\r\n    #AddEncoding x-gzip .gz .tgz\r\n    #\r\n    # If the AddEncoding directives above are commented-out, then you\r\n    # probably should define those extensions to indicate media types:\r\n    #\r\n    AddType application\/x-compress .Z\r\n    AddType application\/x-gzip .gz .tgz\r\n\r\n    #\r\n    # AddHandler allows you to map certain file extensions to \"handlers\":\r\n    # actions unrelated to filetype. These can be either built into the server\r\n    # or added with the Action directive (see below)\r\n    #\r\n    # To use CGI scripts outside of ScriptAliased directories:\r\n    # (You will also need to add \"ExecCGI\" to the \"Options\" directive.)\r\n    #\r\n    #AddHandler cgi-script .cgi\r\n\r\n    # For type maps (negotiated resources):\r\n    #AddHandler type-map var\r\n\r\n    #\r\n    # Filters allow you to process content before it is sent to the client.\r\n    #\r\n    # To parse .shtml files for server-side includes (SSI):\r\n    # (You will also need to add \"Includes\" to the \"Options\" directive.)\r\n    #\r\n    #AddType text\/html .shtml\r\n    #AddOutputFilter INCLUDES .shtml\r\n&lt;\/IfModule&gt;\r\n\r\n#\r\n# The mod_mime_magic module allows the server to use various hints from the\r\n# contents of the file itself to determine its type.  The MIMEMagicFile\r\n# directive tells the module where the hint definitions are located.\r\n#\r\n#MIMEMagicFile conf\/magic\r\n\r\n#\r\n# Customizable error responses come in three flavors:\r\n# 1) plain text 2) local redirects 3) external redirects\r\n#\r\n# Some examples:\r\n#ErrorDocument 500 \"The server made a boo boo.\"\r\n#ErrorDocument 404 \/missing.html\r\n#ErrorDocument 404 \"\/cgi-bin\/missing_handler.pl\"\r\n#ErrorDocument 402 http:\/\/www.example.com\/subscription_info.html\r\n#\r\n\r\n#\r\n# MaxRanges: Maximum number of Ranges in a request before\r\n# returning the entire resource, or one of the special\r\n# values 'default', 'none' or 'unlimited'.\r\n# Default setting is to accept 200 Ranges.\r\n#MaxRanges unlimited\r\n\r\n#\r\n# EnableMMAP and EnableSendfile: On systems that support it, \r\n# memory-mapping or the sendfile syscall may be used to deliver\r\n# files.  This usually improves server performance, but must\r\n# be turned off when serving from networked-mounted \r\n# filesystems or if support for these functions is otherwise\r\n# broken on your system.\r\n# Defaults: EnableMMAP On, EnableSendfile Off\r\n#\r\n#EnableMMAP off\r\n#EnableSendfile on\r\n\r\n# Supplemental configuration\r\n#\r\n# The configuration files in the conf\/extra\/ directory can be \r\n# included to add extra features or to modify the default configuration of \r\n# the server, or you may simply copy their contents here and change as \r\n# necessary.\r\n\r\n# Server-pool management (MPM specific)\r\n#Include conf\/extra\/httpd-mpm.conf\r\n\r\n# Multi-language error messages\r\n#Include conf\/extra\/httpd-multilang-errordoc.conf\r\n\r\n# Fancy directory listings\r\n#Include conf\/extra\/httpd-autoindex.conf\r\n\r\n# Language settings\r\n#Include conf\/extra\/httpd-languages.conf\r\n\r\n# User home directories\r\n#Include conf\/extra\/httpd-userdir.conf\r\n\r\n# Real-time info on requests and configuration\r\n#Include conf\/extra\/httpd-info.conf\r\n\r\n# Virtual hosts\r\n#Include conf\/extra\/httpd-vhosts.conf\r\n\r\n# Local access to the Apache HTTP Server Manual\r\n#Include conf\/extra\/httpd-manual.conf\r\n\r\n# Distributed authoring and versioning (WebDAV)\r\n#Include conf\/extra\/httpd-dav.conf\r\n\r\n# Various default settings\r\n#Include conf\/extra\/httpd-default.conf\r\n\r\n# Configure mod_proxy_html to understand HTML4\/XHTML1\r\n&lt;IfModule proxy_html_module&gt;\r\nInclude conf\/extra\/proxy-html.conf\r\n&lt;\/IfModule&gt;\r\n\r\n# Secure (SSL\/TLS) connections\r\n#Include conf\/extra\/httpd-ssl.conf\r\n#\r\n# Note: The following must must be present to support\r\n#       starting without SSL on platforms with no \/dev\/random equivalent\r\n#       but a statically compiled-in mod_ssl.\r\n#\r\n&lt;IfModule ssl_module&gt;\r\nSSLRandomSeed startup builtin\r\nSSLRandomSeed connect builtin\r\n&lt;\/IfModule&gt;\r\n\r\n&lt;IfModule php7_module&gt;\r\n    PHPINIDir \"c:\\php\"\r\n&lt;\/IfModule&gt;\r\n\r\n\r\n&lt;FilesMatch \"\\.php$\"&gt;\r\n  AddHandler php7-script .php\r\n  AddType application\/x-httpd-php .php\r\n&lt;\/FilesMatch&gt;\r\n\r\n\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u76f4\u63a5\u770b\u4e00\u4e0b httpd.conf \u4ee5\u4e0b\u5185\u5bb9\u5f88\u91cd\u8981\u3002 ServerRoot &#8220;c:\\Apache24&#8221; List [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34701","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>PHP\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5 - 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\/php\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5\" \/>\n<meta property=\"og:description\" content=\"\u76f4\u63a5\u770b\u4e00\u4e0b httpd.conf \u4ee5\u4e0b\u5185\u5bb9\u5f88\u91cd\u8981\u3002 ServerRoot &quot;c:Apache24&quot; List [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/php\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-29T05:25:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-29T02:26:04+00:00\" \/>\n<meta name=\"author\" content=\"\u97f5, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u97f5, \u79d1\" \/>\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\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/\",\"name\":\"PHP\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-01-29T05:25:42+00:00\",\"dateModified\":\"2024-04-29T02:26:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5\"}]},{\"@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\/6530331a63adef3b3443a1fab53a0e6e\",\"name\":\"\u97f5, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g\",\"caption\":\"\u97f5, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PHP\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5 - 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\/php\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"PHP\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5","og_description":"\u76f4\u63a5\u770b\u4e00\u4e0b httpd.conf \u4ee5\u4e0b\u5185\u5bb9\u5f88\u91cd\u8981\u3002 ServerRoot \"c:Apache24\" List [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/php\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-01-29T05:25:42+00:00","article_modified_time":"2024-04-29T02:26:04+00:00","author":"\u97f5, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u97f5, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"16 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/","name":"PHP\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-01-29T05:25:42+00:00","dateModified":"2024-04-29T02:26:04+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/6530331a63adef3b3443a1fab53a0e6e"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP\u5df2\u7ecf\u88ab\u4e0b\u8f7d\uff0c\u53ef\u63d0\u4f9b\u89e3\u51b3\u65b9\u6cd5"}]},{"@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\/6530331a63adef3b3443a1fab53a0e6e","name":"\u97f5, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/429ccb39b3fff5188bc17986222cfb0936cbadb8cc933cff04ab5ca01bd30a08?s=96&d=mm&r=g","caption":"\u97f5, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunke\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/php%e5%b7%b2%e7%bb%8f%e8%a2%ab%e4%b8%8b%e8%bd%bd%ef%bc%8c%e5%8f%af%e6%8f%90%e4%be%9b%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34701","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\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=34701"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34701\/revisions"}],"predecessor-version":[{"id":84714,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/34701\/revisions\/84714"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=34701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=34701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=34701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}