Forum Moderators: bakedjake
I have 2 computers. One is running win XP and connects to the web using a dial up account. The second computer is running Suse Linux. And connects to the web through the win xp machine. The 2 computers are connected using network cable and a hub. Really this is 2 questions first one….
When I install apache on the Linux box how do I find the address to view the pages using the browser on the xp box. I can connect to the web no problem so the two computers are for sure connected properly,
Second. Is it possible to access the pages hosted on apache from an external location … by visiting an IP address etc.
I think the logical solution to the second would be to install the Linux box as the gateway computer and have that connected directly to the web. But it was a win modem and is not recognised by the OS.
So how do I view pages stored on a LAN server
And can I view these pages externally.
Thanks in advance.
eth0 Link encap:Ethernet HWaddr 00:00:21:CC:F2:90
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:626155 errors:0 dropped:0 overruns:0 frame:0
TX packets:225407 errors:0 dropped:0 overruns:0 carrier:0
collisions:137 txqueuelen:100
RX bytes:262150448 (250.0 MiB) TX bytes:26855549 (25.6 MiB)
Interrupt:5 Base address:0xf000
The part I added bold to is what you are after. In the case above, you would type 'http://192.168.1.1/' into the address field in your browser on the windows machine.
To visit this page from the outside world in your configuration, you would have to forward port 80 on the windows machine to port 80 on the Linux machine. I haven't a clue how to make a windows machine do this, although I have no doubt it's possible. (I don't do windows.)
if apache is running it will pull the index file, test it from the linux machine.
How would you do this if you try to use the box to host several sites.
I'm thinking about setting up the box I have Mandrake on to test sites before putting them up live.
[corrected spelling]
[edited by: Big_Balou at 7:01 am (utc) on Jan. 19, 2003]
How would you do this if you try to use the box to host several sites.I'm thinking about setting up the box I have Mandrake on to test sites before putting them up live.
Assign a static IP to the apache box.
And on another box, just add domains to your hosts file (windows\hosts or /etc/hosts).
Let's say your apache box has an IP 192.168.1.10 and you want to create a testdomain.com.
Edit your hosts file on the other box and place:
testdomain.com 192.168.1.10
That way your other box will think that testdomain.com is on 192.168.1.10 without the use of a name server.
You can add as many domains as you need.
I run a freebsd box on the same lan and use it for testing.
And I test sites from a windows box with all those domains listed in the hosts file.
It also does the trick when you are moving a live site to a new host. It gives you the ability to test everything on the new host before modifying your dns zone and releasing it to the world ;)
I also found a pretty good resource for linux newbies like myself at : [linuxnewbie.org...]
Disclaimer: I have no affiliation with the above mentioned site.
I have something like:
127.0.0.1 localhost
# firewall/router gateway
192.168.2.1 mywall.domain.com
# This Win box
192.168.2.2 mymain.domain.com
# another Win box
192.168.2.3 mysec.domain.com
# Linux server box
192.168.2.10 myww.domain.com
GeorgeGG