1. Change to the following content (two parts)
<code class="hljs"><span class="hljs-tag"><Directory "E:/wamp/bin/apache/apache2.4.9/cgi-bin"> <span class="hljs-keyword">AllowOverride None <span class="hljs-keyword"><span class="hljs-common">Options None <span class="hljs-keyword">Require <span class="hljs-literal">all granted <span class="hljs-tag"></Directory> <span class="hljs-comment"># onlineoffline tag - don't remove <span class="hljs-keyword">Require <span class="hljs-literal">all granted <span class="hljs-keyword"><span class="hljs-common">allow from <span class="hljs-literal">all <span class="hljs-tag"></Directory></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code>
1. Change the following content
<code class="hljs"><IfModule dir_module> DirectoryIndex index<span class="hljs-class">.php index<span class="hljs-class">.php3 index<span class="hljs-class">.html index<span class="hljs-class">.htm </IfModule><br></span></span></span></span></code>
2. If the page contained above is not in the localhost folder, entering localhost in the address bar will display the files in the localhost folder
<code class="hljs"><span class="hljs-attribute">error_reporting =<span class="hljs-string"> E_ALL & ~E_NOTICE</span></span></code>
date.timezone = prc (China time zone) in the php.ini file
<code class="hljs"><span class="hljs-keyword">httpd.conf文件修改, <span class="hljs-keyword">AllowOverride <span class="hljs-literal">all <span class="hljs-keyword">Require <span class="hljs-literal">all granted <span class="hljs-keyword"><span class="hljs-common">allow from <span class="hljs-literal">all</span></span></span></span></span></span></span></span></code>
<code class="hljs"><span class="hljs-tag"><VirtualHost *:80> <span class="hljs-keyword"><span class="hljs-common">ServerName blog <span class="hljs-keyword"><span class="hljs-common">DocumentRoot <span class="hljs-string">"E:/blog" <span class="hljs-tag"><Directory "E:/blog"> <span class="hljs-keyword"><span class="hljs-common">Options Indexes FollowSymLinks <span class="hljs-keyword">AllowOverride <span class="hljs-literal">all <span class="hljs-keyword"><span class="hljs-common">Order Allow,Deny <span class="hljs-keyword"><span class="hljs-common">Allow from <span class="hljs-literal">all <span class="hljs-tag"></Directory> <span class="hljs-tag"></VirtualHost></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code>
<code class="hljs">文件位置:<span class="hljs-tag">C:\<span class="hljs-tag">Windows\<span class="hljs-tag">System32\<span class="hljs-tag">drivers\<span class="hljs-tag">etc 127<span class="hljs-class">.0<span class="hljs-class">.0<span class="hljs-class">.1 blog</span></span></span></span></span></span></span></span></code>
- NOTE:
1. Options Indexes FollowSymLinks If not, disable Apache from displaying the directory structure. The user will not see the list of files and subdirectories in this directory.
2. When entering the second site for the first time, you need to put http:// in front of the address (I don’t know why)