現在、すべてのWebサイトをの下のディレクトリとして持っています/var/www。ディレクトリhttp://foo/を指す仮想ホストをセットアップしたい/var/www/foo/foo(そして、デフォルトのlocalhostの動作を維持したい)。
私は、次のファイルを追加fooし、/etc/apache2/sites-available/:
<VirtualHost *:80>
ServerName foo
DocumentRoot /var/www/foo/foo
# Other directives here
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/foo/foo>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
次に、次のコマンドを実行しました。
sudo a2ensite foo
sudo /etc/init.d/apache2 reload
しかし、私がhttp://foo/それに行くとき、まだISP検索ページを返します。
directoryブロックは異なるべきではありませんか?