1.更改为一下内容(有两部分)
<code class="hljs"><span class="hljs-tag"><directory> <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"></span></span></span></span></span></span></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"></span></span></span></span></span></span></span></span></code>
1.更改以下内容
<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 </span></span></span></span></ifmodule><br></code>
2.如果localhost文件夹中没有上面所包含的页面,地址栏输入localhost将显示localhost文件夹内的文件
<code class="hljs"><span class="hljs-attribute">error_reporting =<span class="hljs-string"> E_ALL & ~E_NOTICE</span></span></code>
php.ini文件里的 date.timezone = prc(中国时区)
<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> <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> <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"></span></span></span></span></span></span></span></span></span></span></directory> <span class="hljs-tag"></span></span></span></span></span></span></span></virtualhost></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>
- 注意:
1. Options Indexes FollowSymLinks 如果没有,则禁止 Apache 显示该目录结构。用户就不会看到该目录下的文件和子目录列表了。
2. 第一次输入第二站点时,需要在地址前面带上http://(不知道为什么)