LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   A Home Based Intranet? (https://www.linuxquestions.org/questions/linux-networking-3/a-home-based-intranet-177713/)

Yamabob217 05-04-2004 09:07 AM

A Home Based Intranet?
 
I'd like to set up a Linux Web Server that will serve web pages to a Windows PC WITHOUT using the Internet.

I'm not sure if this is the right forum for this question. But if somebody could suggest the best way to proceed or just add their thoughts on the subject, I'd really appreciate it.

Thanks,

Bob

rush_pl 05-04-2004 09:43 AM

So you want to setup a web server on your INTRANET?
All u have to do is install apache on the server and configure it to serve on the internal ip address. If the server is not connected to the Internet you will not have to do much (maybe even nothing) to the httpd.conf file.

frogman 05-04-2004 02:12 PM

It's easy, I use mine for testing websites / pages before they go live. Hardware-wise I use a P233 with 90 MB RAM (it doesn't need this but it's my only machine to still use SIMMS.)

What are you going to do with it? PHP / MySQL / the whole Shebang? - Use Apache .
Just pushing html? Try thttpd http://www.acme.com/software/thttpd/ which is simple and fast, though it can be a pig with file permissions. (religiously 755 directories and 644 files).

Apache experience is always useful, but you might just want something simple that works.

You can get a basic Apache setup running in under 1/2 hr, less for thttpd (including compile time). Boa and mathopd (google for them) are also nice and lightweight, I prefer thttpd - YMMV.

Choose a distro you're comfortable with (or pick an easy-ish one), do a minimal install (allocating a generous partition to /var/www - where your webpages will sit) and then pick your webserver.

If you let us know whether it's for just your docs / files or actual development work, you'll probably get better answers.

Yamabob217 05-04-2004 06:52 PM

Thanks for the reply Frogman.

Yes, my goal is to use this for testing as well. As for the types of pages that I'm going to serve, you can say that I'd like to do the whole "shebang". So we can assume that it'll be using Apache.

I haven't purchased a distribution yet, but I'm probably going to go with Redhat or Debian. The reason being that I'd like to duplicate the environment that my hosting provider utilizes.

With that said, I think that I can get the OS installed and set-up without any problems. At least I can conceptualize what's involved with this process.

However, things get a little fuzzy when I think about connecting my Windows PC to the Linux Web Server. I guess my confusion can be narrowed down to the following question...

Do I just connect these two boxes together with a hub between the two or do I need to set-up a LAN as well?

Frogman, how did you go about configuring your connection between the two boxes?

And of course, any other hazards or concerns to look out for would be greatly appreciated.

Bob

emilryge 05-04-2004 08:26 PM

What I did
 
I just did this a few minutes ago - just to see if it worked...

Made sure that apache was running (httpd).

Hooked up a cable between the XP laptop and the Linux box and gave them static ip addresses, 192.168.0.2 (laptop) and 192.168.0.3 (linux server).

Made sure i could ping, and then just typed http://192.168.0.3 in IE on the XP laptop.

There you go. So simple :-)

- Emil

frogman 05-05-2004 02:15 PM

Quote:

Originally posted by Yamabob217


Do I just connect these two boxes together with a hub between the two or do I need to set-up a LAN as well?

Two machines and a hub is a LAN (well, an embryo LAN anyway).
Quote:


Frogman, how did you go about configuring your connection between the two boxes?

Plugged it into the existing LAN :)
Once your webserver is set up, connect both machines to your hub and give them static IP addresses - you can set the webserver ip address during install (like in the post above, choose your addresses).
Add the webserver ip address and name to your workstations /etc/hosts file i.e:
Code:

127.0.0.1    localhost
ip.address.of.webserver  webservername

this will let you type http://webservername into your browser, rather than just the IP address.
Quote:


And of course, any other hazards or concerns to look out for would be greatly appreciated.

Nothing major, just remember the basics:

Ping to test connections
Install the Apache Manual as well, it's worth it.
Make sure that your webservers firewall allows connections on port 80/tcp.
You'll probably want to install OpenSSH and / or Webmin on the webserver if you're planning on running it without a monitor / keyboard.
OpenSSH will let you upload files to the server via secure ftp, webmin gives a gui interface for managment if you're not entirely happy with the command line.
Ensure the webserver is patched - download them using the workstation then sftp the patches across.
Once you can see something at http://webservername, start transferring your files across (put them in /var/www).
You should chmod your folders in /var/www to 755, files to 644 - it's a good habit to get into.


All times are GMT -5. The time now is 08:45 AM.