Virtual Host issues on local network

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Virtual Host issues on local network

Postby bloodyred » 29. December 2011 18:28

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
bloodyred
 
Posts: 5
Joined: 02. July 2011 16:15
Location: Colorado
Operating System: Windows Server 2008 R2

Re: Virtual Host issues on local network

Postby Sharley » 29. December 2011 18:30

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. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Virtual Host issues on local network

Postby bloodyred » 29. December 2011 18:40

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
Last edited by bloodyred on 29. December 2011 18:43, edited 1 time in total.
bloodyred
 
Posts: 5
Joined: 02. July 2011 16:15
Location: Colorado
Operating System: Windows Server 2008 R2

Re: Virtual Host issues on local network

Postby Sharley » 29. December 2011 18:42

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.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Virtual Host issues on local network

Postby bloodyred » 29. December 2011 18:52

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
bloodyred
 
Posts: 5
Joined: 02. July 2011 16:15
Location: Colorado
Operating System: Windows Server 2008 R2

Re: Virtual Host issues on local network

Postby Sharley » 29. December 2011 18:58

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?
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Virtual Host issues on local network

Postby bloodyred » 29. December 2011 19:02

no because it just want to go to http://localhost/roku

Hmm thanks for the suggestions tho
bloodyred
 
Posts: 5
Joined: 02. July 2011 16:15
Location: Colorado
Operating System: Windows Server 2008 R2

Re: Virtual Host issues on local network

Postby Sharley » 29. December 2011 19:10

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).
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 72 guests