Click to See Complete Forum and Search --> : serving an html document over the LAN only


optech
09-29-2001, 05:22 PM
running apache.
looking to make an html document that can only be viewed by any local computers.
it'll have information like cron'd nmaps of the network and other security information...
i don't want just anybody to be able to surf into it...

freebsd
09-29-2001, 05:32 PM
Apache will listen to all available NIC by default. So you need to tell Apache to listen to particular IP. You also can utilitize /etc/hosts or C:\Windows\Hosts or C:\WinNT\System32\Drivers\Etc\Hosts for domain/ip mapping if you are not running and DNS.

jcrowe
09-30-2001, 12:31 AM
You could also block port 80 unless users are on local ip range using ipchains/iptables.

Craig McPherson
09-30-2001, 11:25 AM
The two previous posts concern only blocking your entire webserver from the outside. What I inferred from your post is that you're trying to block only certain documents from being accessed from the outside, in which case the above posts won't help you.

You have two simple options: put all the files you want protected in a directory and use a Location or Directory directive with "Allow from" and "Deny from" directives inside it. Look at your existing httpd.conf and there should be some examples there. The other option is (I don't know much about doing this, so you'd have to look it up) using a .htaccess file.

optech
09-30-2001, 02:17 PM
thanks craig...
i figured it had SOMETHING to do with the .htaccess file (from the name... i don't actually know much about that file and it's capabilities/options, yet) i'll give it a learn and a spin, and i'll post back if it works or not...