LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-27-2011, 09:39 AM   #1
ksmatthews
Member
 
Registered: Aug 2008
Posts: 86

Rep: Reputation: 15
Question running linux web apps in windows


Hi all,

I have a simple home network consisting of 2 laptops - one is a linux box and the other runs windows and linux with a dual boot setup.

I develop my web apps on the linux box but would like to test them out on the windows machine using IE7. I have abandoned the idea of doing this in Linux using wine since in the real world this is unrealistic ...

How can I get my Windows machine to see the localhost web apps which run on the linux box ?

regards,

Steven Matthews
 
Old 02-27-2011, 09:45 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
erm... open browser, go to address of linux box. Am I missing something? What level of "how" are you talking about? From physical connectivity to j2ee server configuration, there's a range of different things to look at.
 
Old 02-27-2011, 09:59 AM   #3
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
If the Ubuntu box has Apache running then it should be listening on port 80. You can use netstat -nat to check. If it is then you should be able to use the IP address of the Ubuntu box from the windows box to bring up the web pages that you have created on the Ubuntu box.

Or to use the virtual host name instead of the ubuntu IP, you can add them to your hosts (C:\WINDOWS\system32\drivers\etc\hosts) file on the windows box. For example:

Code:
xxx.xxx.xxx.xxx    www.example.com
Were www.example.com would be the name of you virtual host. You can have multiple virtual hosts pointing to the same IP address. While this works fine for testing, of course it would not work in production.

Regards,

Fordeck
 
Old 02-27-2011, 03:23 PM   #4
ksmatthews
Member
 
Registered: Aug 2008
Posts: 86

Original Poster
Rep: Reputation: 15
Thanks for that ....

My apps live in virtual servers with addresses like dev.fpc.com for example.

How would I direct the windows browser to a particular VS using the same IP address ?

regards,

Steven Matthews
 
Old 02-27-2011, 03:41 PM   #5
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Quote:
How would I direct the windows browser to a particular VS using the same IP address ?
Do you mean virtual host?

If so then like I said in my previous post create an entry in the windows host file. You can have multiple names associated with an IP address. For example:

Code:
xxx.xxx.xxx.xxx    www.example.com dev.fpc.com
In the above host file entry both www.example.com and dev.fpc.com are associated with the same IP address. In your case the address of the Ubuntu box. So when you access either of the above names in Internet Exploder they will pull up the associated virtual host on the ubuntu box.

Again this works fine for testing, of course it would not work in production.

Regards,

Fordeck
 
Old 02-27-2011, 03:41 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well it depends on the virtualized networking. Ideally you'd just be using bridged networking, in which case there is no special action at all. The VM appears on the same subnet like any other physical device. If you have nat networking then you'd need the host to redirect certain ports into the VM of your choosing. It's probably worthwhile converting to bridged if you're not already doing this. ALso note that the name of your apps is of no consequence at all.
 
Old 02-27-2011, 03:42 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by fordeck View Post
Do you mean virtual host?
Well the term "virtual host" is one of the vaguest in IT today. This could mean all sorts of things. Apache VirtualHosts, Virtual Machines, Clusters, Cloud services...
 
Old 02-27-2011, 03:48 PM   #8
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Your absolutely right, I should have Phrased the question differently. What I was wondering is if he was referring to an Apache VirtualHost?


Thanks for catching that.

Regards,

Fordeck
 
Old 02-28-2011, 01:09 AM   #9
ksmatthews
Member
 
Registered: Aug 2008
Posts: 86

Original Poster
Rep: Reputation: 15
Thanks fordeck ...

RE Or to use the virtual host name instead of the ubuntu IP, you can add them to your hosts (C:\WINDOWS\system32\drivers\etc\hosts) file on the windows box.

After editing this file do I need to reboot windows in order for the OS to pick it up ?

Steven Matthews
 
Old 02-28-2011, 07:36 AM   #10
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Quote:
After editing this file do I need to reboot windows in order for the OS to pick it up ?
You should not need to reboot. To verify that the host file entries are working you could ping the names to see if they are resolving to the IP you associated them with.

Regards,

Fordeck
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GNU/Linux Desktop: The Case Against Running Windows Apps DragonSlayer48DX Linux - News 0 02-27-2008 06:42 PM
Web-based apps: ActiveX/Java:Windows <--> ${???}:GNU/Linux johnMG Programming 3 12-03-2004 08:37 PM
Running Windows Apps on Linux piggysmile Linux - Newbie 1 04-24-2004 06:38 PM
Whats the best software available from running windows apps under linux Munix Linux - Software 2 01-30-2004 01:44 PM
Running Windows apps from Linux mquinlivan Linux - Newbie 4 06-07-2003 11:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration