ホームページ  >  記事  >  運用・保守  >  Apache仮想ディレクトリの設定方法

Apache仮想ディレクトリの設定方法

王林
王林転載
2020-06-12 18:02:295156ブラウズ

Apache仮想ディレクトリの設定方法

具体的な方法は以下のとおりです:

1.「仮想ディレクトリ設定ファイル」httpd-vhosts.conf

ファイルパス:\を開きます。 wamp\bin\ apache\apache2.4.9\conf\extra\httpd-vhosts.conf

次の構成を

# Virtual hosts
# Include conf/extra/httpd-vhosts.conf

から

# Virtual hosts
Include conf/extra/httpd-vhosts.conf
# に変更します。 ##2、仮想ディレクトリをアクセス可能に設定します


ファイル パス:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf

Configure次の:

<Directory /> 
 AllowOverride none 
 Require all denied 
 </Directory>

は、次のように変更されます:


<Directory /> 
 AllowOverride none 
 </Directory>

3. 仮想ディレクトリ

ファイル パスを追加します: \wamp\bin\apache\apache2.4.9\conf \extra\httpd-vhosts.conf

仮想ディレクトリの追加

<VirtualHost *:80> 
 ServerAdmin webmaster@web.shop.com 
 DocumentRoot "D:/_HelloWorld/01_MyProjects/06_PHP/01_Web/Product/Source/Shop" 
 ServerName web.shop.com 
 ErrorLog "logs/web.shop.com-error.log" 
 CustomLog "logs/web.shop.com-access.log" common 
</VirtualHost>

4.apacheの再起動


完了!

推奨チュートリアル:

Apache の入門から習熟まで

以上がApache仮想ディレクトリの設定方法の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事はjb51.netで複製されています。侵害がある場合は、admin@php.cn までご連絡ください。