Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have 3 machines hooked up to one Linksys router (internal network). One machine is running Apache2, so I want it to be a webserver. I did an IP check, but all three machines have the same IP.
So how can I access the webserver machine with my web browser?
On a scale of 1 to 10, 10 being uber nube, how n00bish was this question?
how did you check the ip addresses? How are the machines connected (wired or wireless)? Also it is highly unlikely that you would have same IP address for all three machines.
To connect to the machine running the server, open up your browser and type the ip address of the machine running the web server.
Originally posted by tuxrules how did you check the ip addresses? How are the machines connected (wired or wireless)? Also it is highly unlikely that you would have same IP address for all three machines.
It's a wired connection, not wireless. It's a little, 10/100 5-port Workgroup Switch from Linksys.
And the same IP address came up for two machines, I haven't checked the third one yet.
I did open up a web browser, typed in the ip address (and the port number, because I went into the config and edited it so it's not listening to port 80). Nothing came up.
It isn't a lack of linux knowledge that is your problem, it is networking. That web page you posted gives you your "real world" IP, which is why all 3 computers had the same. That IP address actually belongs to the router. You fail to see a website because the router is not set to forward requests on whatever port you chose to the computer running Apache. You need to do 2 things - find out your local IP address, and forward requests at port whatever to the Apache server. For linux, /sbin/ifconfig will give you the IP addresses of the wired ethernet cards. Since you're behind a device, you will mostlikely have a local IP of 192.168.X.X, 172.16.X.X->172.31.X.X, or 10.X.X.X. Once you find out the IP address of the Apache box, you'll be able to see it from the other computers in your LAN, again with the specified port. If the other boxes run another nasty operating system, open a command prompt and type ipconfig, and that tells your IP address.
Then if you want the website to be seen on the net, you need to configure the router to pass the requests for port whatever to the Apache box.
Originally posted by JimBass You need to do 2 things - find out your local IP address, and forward requests at port whatever to the Apache server. For linux, /sbin/ifconfig will give you the IP addresses of the wired ethernet cards. Since you're behind a device, you will mostlikely have a local IP of 192.168.X.X,
Thanks for your help!
I did /sbin/ifconfig, and my ip was 192.168.x.x
So I went to the other machine (which is running another operating system), opened up a web browser, typed in the ip (and the port I'm using) and it worked!
So now I am able to have the code/database reside on the Linux machine, and then my co-worker can insert/update/delete records on a W*****s machine.
FYI, it is always safe to post 192.168 addresses in full. You can't reach 192.168 over the internet, only a LAN/WAN, so you could have posted the full address, and nobody could have touched your box.
Originally posted by JimBass FYI, it is always safe to post 192.168 addresses in full. You can't reach 192.168 over the internet, only a LAN/WAN, so you could have posted the full address, and nobody could have touched your box.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.