Page 1 of 1

Virtual Host issues on local network

PostPosted: 29. December 2011 18:28
by bloodyred
So I'm trying to make a local Virtual Host in my network so I can stream videos to my roku using roksbox.

So here is my setup
Xampp is installed on Drive C and all my videos are on Drive D so I've try seeing it up so i can make like a second localhost.

Hosts
Code: Select all
127.0.0.1       localhost
127.0.0.1       roku


httpd-vhosts.conf
Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
   DocumentRoot "D:\webserver\roku\htdocs\roku"
   ServerName roku

   <Directory "D:\webserver\roku\htdocs\roku">
      Options Indexes FollowSymLinks Includes ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>


I can see the folders on the computer running xampp but not on any other device so what am I missing

Also I've tried a real domain and it will work but then it's streaming over the internet and not local network

Re: Virtual Host issues on local network

PostPosted: 29. December 2011 18:30
by Sharley
Would you be so kind as to add your XAMPP version and Operating System to your profile as per these instructions:
viewtopic.php?f=16&t=48626
Thanks. :)

Re: Virtual Host issues on local network

PostPosted: 29. December 2011 18:40
by bloodyred
Oh my bad

and might as well post it here too

XAMPP Version: 1.7.7
Operating System: Microsoft Windows Server 2008 R2

Mainly used as a game server

Re: Virtual Host issues on local network

PostPosted: 29. December 2011 18:42
by Sharley
Thanks for that. :)


Your vhost and hosts file settings will work for localhost and 127.0.0.1

You have to add to the other devices on your network a similar entry in their hosts file only this time you use the LAN IP address of the XAMPP PC
Code: Select all
nnn.nnn.nnn.nnn       roku
nnn = XAMPP PC IP.

Re: Virtual Host issues on local network

PostPosted: 29. December 2011 18:52
by bloodyred
ok but the roku doesn't have a hosts file and it's a top-set box.

I can stream from an address like http://domain.com/ruko but I'm trying to do http://ruko/roku

I might be trying to do the impossible

Xampp Server IP: 192.168.2.2
Roku IP: 192.168.2.8

Re: Virtual Host issues on local network

PostPosted: 29. December 2011 18:58
by Sharley
Unless there is a similar hosts file type configuration in that set-top box then you may be able to use DHCP, but I am not familiar with setting this kind of configuration - someone else may be able to help with that.

Does http://nnn.nnn.nnn.nnn/roku work?

Re: Virtual Host issues on local network

PostPosted: 29. December 2011 19:02
by bloodyred
no because it just want to go to http://localhost/roku

Hmm thanks for the suggestions tho

Re: Virtual Host issues on local network

PostPosted: 29. December 2011 19:10
by Sharley
localhost and 127.0.0.1 are specific for that PC and not available from another device on the network.

Each PC on a LAN has it's own localhost (local loop back address).