xamppでlocalhost サブドメイン設定の覚書
毎回忘れてしーまーうー のでええ加減にメモ
C:\xampp\apache\conf\extra\httpd-vhosts.conf
①NameVirtualHost *:80のコメントアウト外す
##NameVirtualHost *:80
②バーチャルホストの設定
<VirtualHost *:80> DocumentRoot "C:/xampp/htdocs" ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs/demo" ServerName demo.localhost </VirtualHost>
C:\Windows\System32\drivers\etc\hosts
①hostsにサブドメインを設定
127.0.0.1 localhost 127.0.0.1 demo.localhost
xamppのコンパネでapacheを再起動で完了!