From owner-freebsd-questions Thu May 18 15:33:28 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id PAA22174 for questions-outgoing; Thu, 18 May 1995 15:33:28 -0700 Received: from haven.ios.com (haven.ios.com [198.4.75.45]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id PAA22166 for ; Thu, 18 May 1995 15:33:25 -0700 Received: (from rashid@localhost) by haven.ios.com (8.6.11/8.6.9) id SAA28857; Thu, 18 May 1995 18:36:04 -0400 From: "Rashid Karimov." Message-Id: <199505182236.SAA28857@haven.ios.com> Subject: Re: WWW without httpd To: smmcgee@ncbc.edu (Sean McGee) Date: Thu, 18 May 1995 18:36:04 -0400 (EDT) Cc: questions@FreeBSD.org In-Reply-To: <199505180814.IAA23219@localhost> from "Sean McGee" at May 18, 95 08:13:17 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1560 Sender: questions-owner@FreeBSD.org Precedence: bulk Hi there, > > To avoid having to buy, install, and maintain a http server, yet have > the ability to respond to http request, I did the following. > Please tell me if there are any potential security risks. > > (I run FreeBSD 2.0R (4.2BSD)) Hmmmmm ... Looks to me that you already did 99% of the job and paid 100% of money :) The httpd daemon is free - unless you have to hire somebody to configure it. The httpd binaries for FreeBSD ( which is actually BSD4.4) are available at ftp.freebsd.org - grab them , configure few parameters and rock the planet! > > My /etc/services listens to port 80(default) for http requests. So in my > inetd.conf I simply add a line: > www stream tcp nowait root /bin/cat cat /filename.html > > Now, when an http client contacts that port, the file 'filename.html' > is catted back to them and is performing the function of a > 'poor man's http server' > > I have now assigned several ports to do the same thing in order to layer > pages. > I have even assigned a .gif file to a port and as long as the http client > is told that it is a gif, then it has no problems displaying it as a gif. > example: > http://some.place.com:80 and http://some.place.com:80/bogusfile.gif > do the exact same thing, but the client sees the 'bogusfile.gif' and > displays the file as a gif. > > My questions are: > What is the catch? Have I missed something? The catch is good , but you miss a lot - actually you don't have the protocol at all - but if you're satisfied with it, enjoy the ride :) Rashid