OSをバーチャルホストにリダイレクトします:WinXPのlocalhostが
はサーバー:XAMPP(Apacheの)
空のプロジェクトを作成するために、ZendのCLIツールを使用した後、私は私のhttpd-vhosts.confに提案バーチャルホストセクションを追加し、 hostsファイルにプロジェクト名を追加しました。私のプロジェクトのクイックスタートページは正常に表示されます。しかし、パス 'localhost'は、通常のxmappホームページではなく、プロジェクトページをレンダリングするようになりました。
これは私の仕事を止めさせるものではありません。私はxamppのホームページをまったく使っていません。しかし、私は将来、より多くの仮想ホストを追加すると、矛盾が生じることに懸念しています。
他の関連記事では、NameVirtualHost行のコメントを外しました。しかし、それは仕事のように見えませんでした。それから私は、次の各を試みたが、無駄に:
- NameVirtualHost *が
- NameVirtualHostでのlocalhost:80に
- がNameVirtualHost *:80
のhttpd-vhosts.conf
NameVirtualHost localhost
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/cv/public"
ServerName .local
# This should be omitted in the production environment
SetEnv APPLICATION_ENV development
<Directory "C:/xampp/htdocs/cv/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
ホスト
127.0.0.1 localhost
127.0.0.1 cv
http://httpd.apache.org/docs/2.0/vhosts/name-based.html – Jake
http://httpd.apache.org/docs/2.0/vhosts/examples.html – Jake
ありがとう。リンクは特に有用でした。それは確かに私のブックマークに入っています。 – dsulli