From owner-freebsd-questions Sat Sep 27 17:06:57 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA22050 for questions-outgoing; Sat, 27 Sep 1997 17:06:57 -0700 (PDT) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id RAA22045 for ; Sat, 27 Sep 1997 17:06:52 -0700 (PDT) Received: (from grog@localhost) by freebie.lemis.com (8.8.7/8.8.5) id JAA02556; Sun, 28 Sep 1997 09:36:38 +0930 (CST) Message-ID: <19970928093638.37943@lemis.com> Date: Sun, 28 Sep 1997 09:36:38 +0930 From: Greg Lehey To: Keith Spencer Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Port 80 being used?How can I tell References: <199709252104.HAA27269@smmcroute.smmc.qld.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81e In-Reply-To: <199709252104.HAA27269@smmcroute.smmc.qld.edu.au>; from Keith Spencer on Fri, Sep 26, 1997 at 08:19:13AM +1000 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8250 Fax: +61-8-8388-8250 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Fight-Spam-Now: http://www.cauce.org Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, Sep 26, 1997 at 08:19:13AM +1000, Keith Spencer wrote: > Hi , > Is there a way I can find out what ports are being used? > Apache reports at boot that it can't bind to port 80. > Apache docs say maybe it is being used or maybe the user is set > wrong or something... > Any ideas? If you look in /etc/services, you'll find http 80/tcp www www-http #World Wide Web HTTP http 80/udp www www-http #World Wide Web HTTP In other words, port 80 is known as http. Next, enter $ netstat -a | grep http tcp 0 0 *.http *.* LISTEN If you see the output I've shown, then something is listening on the port http. But that's basically what your Apache error message is telling you. The two most likely possibilities are: 1. You're already running httpd. You can check this with: $ ps aux | grep http grog 2533 3.1 0.7 252 628 p3 S+ 9:32AM 0:00.02 grep http root 119 0.0 0.1 492 132 ?? Ss 5:34PM 0:14.02 /usr/local/www/server/httpd nobody 120 0.0 0.2 536 180 ?? I 5:34PM 0:00.12 /usr/local/www/server/httpd nobody 121 0.0 0.2 528 188 ?? I 5:34PM 0:00.08 /usr/local/www/server/httpd nobody 122 0.0 0.1 492 88 ?? I 5:34PM 0:00.00 /usr/local/www/server/httpd nobody 123 0.0 0.1 492 88 ?? I 5:34PM 0:00.00 /usr/local/www/server/httpd nobody 124 0.0 0.1 492 88 ?? I 5:34PM 0:00.00 /usr/local/www/server/httpd nobody 2009 0.0 0.2 536 188 ?? I 4:28AM 0:00.02 /usr/local/www/server/httpd nobody 541 0.0 0.1 492 80 ?? I 6:04PM 0:00.00 /usr/local/www/server/httpd This display shows 8 httpds (the usual number). 2. If you don't see anything above, check /etc/inetd.conf. If you find a line beginning with http, then inetd is listening on http. If that's not what you want, comment out the line (put a # in front of it), and update inetd: # ps aux | grep inetd root 117 0.0 0.1 196 96 ?? Is 5:34PM 0:00.64 inetd # kill -1 117 The 117 is the second field in the ps output Greg