1. Wechseln Sie zum folgenden Inhalt (zwei Teile)
<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. Ändern Sie den folgenden Inhalt
<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. Wenn oben im Ordner „localhost“ keine Seite enthalten ist, werden durch Eingabe von „localhost“ in die Adressleiste die Dateien im Ordner „localhost“ angezeigt
<code class="hljs"><span class="hljs-attribute">error_reporting =<span class="hljs-string"> E_ALL & ~E_NOTICE</span></span></code>
date.timezone = prc (China-Zeitzone) in der php.ini-Datei
<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>
- HINWEIS:
1. Optionen Indizes FollowSymLinks Wenn nicht, deaktivieren Sie die Anzeige der Verzeichnisstruktur durch Apache. Dem Benutzer wird die Liste der Dateien und Unterverzeichnisse in diesem Verzeichnis nicht angezeigt.
2. Wenn Sie die zweite Site zum ersten Mal betreten, müssen Sie http:// vor die Adresse setzen (ich weiß nicht warum)