-2

i have multiple project in my computer in htdocs i want to access them from other computer on same line. i have change all setting in hosts files

127.0.0.1 wheels.dev

127.0.0.1 property.dev

127.0.0.1 myproperty.dev

and also change in http.conf

<VirtualHost *:80>
    #ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "C:/xampp/htdocs/wheel/"
    ServerName wheel.dev
    ServerAlias www.wheel.dev
    ##ErrorLog "logs/dummy-host2.example.com-error.log"
    ##CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>



<VirtualHost *:80>
    #ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "C:/xampp/htdocs/property/public"
    ServerName property.dev
    ServerAlias www.property.dev
    ##ErrorLog "logs/dummy-host2.example.com-error.log"
    ##CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>



<VirtualHost *:80>
    #ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "C:/xampp/htdocs/myproperty/public"
    ServerName myproperty.dev
    ServerAlias www.myproperty.dev
    ##ErrorLog "logs/dummy-host2.example.com-error.log"
    ##CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

when i try to access the whell.dev or my property.dev all the it only myproperty website not any other please help me out what should i have to change any more in my project Thank you

Kailash Yadav
  • 1,880
  • 2
  • 18
  • 37
  • Check this out: http://stackoverflow.com/questions/4294235/access-apache-virtualhost-from-any-computer-on-lan – Kailash Yadav Jan 14 '16 at 07:30
  • http://stackoverflow.com/questions/11852816/accessing-virtual-host-from-computer-on-same-local-network – Kailash Yadav Jan 14 '16 at 07:30
  • 1
    Please consider formatting your question properly. This will help people answer your question faster, and easier. https://stackoverflow.com/editing-help – pradeepcep Jan 14 '16 at 07:31

1 Answers1

0

When the vhosts only listens on 127.0.0.1 it will only host for the box itself. From any other IP (computer in LAN) it will host the default host. The vhost should be configured to also listen on the IP that the host has in the LAN (192.168.....)

verhie
  • 1,298
  • 1
  • 7
  • 7
  • i will use the 192.168.... when i will access from other computer but when i access these project on my own PC it also show me the same project all the time like if i type wheel.dev it also show the property.dve and when i access the myproperty.dev it also show me the same one property.dev – user3445072 Jan 14 '16 at 07:46