0

i create new VirtualHost

<VirtualHost lar.local>
    DocumentRoot "C:\\wamp\\www\\laravel\\public\\"
    ServerName lar.local
    ServerAlias lar.local
    <Directory "C:\\wamp\\www\\laravel\\public\\"> 
        Order Allow,Deny
        Allow from all
    </Directory>
</VirtualHost>

My host file:

127.0.0.1 localhost
127.0.0.1 lar.local

When i open - lar.local works fine.

But when i open default WAMP address (127.0.0.1), i get "C:\wamp\www\laravel\public\" also the same directory. Why?

Why with 127.0.0.1 i can't open root server directory (C:\wamp\www\) as before? How fix this

lolalola
  • 3,773
  • 20
  • 60
  • 96
  • why would you do that? – Maytham Fahmi May 08 '16 at 20:28
  • http://stackoverflow.com/questions/27754367/how-to-setting-virtual-hosts-for-xampp-in-windows/27754990#27754990 – Maytham Fahmi May 08 '16 at 20:29
  • maytham-ɯɐɥʇʎɐɯ> I need this for my old projects. I add new virtualhost with 80 port (this is my Apache port), but is the same. DocumentRoot "C:\\wamp\\www\\" ServerName 127.0.0.1 – lolalola May 08 '16 at 21:54
  • 1
    [This describes how to create Virtual Hosts properly](http://stackoverflow.com/questions/23665064/project-links-do-not-work-on-wamp-server/23990618#23990618) I think the bit you forgot was that you need to also create a Virtual Host for localhost as the default in `httpd.conf` is ignored when Virtual Hosts are defined. You should also add an entery into the hosts file for the IPV6 network as well, like `::1 localhost` and `::1 lar.local` (seperate lines) – RiggsFolly May 09 '16 at 08:04

0 Answers0