From owner-freebsd-questions@FreeBSD.ORG Fri Aug 20 14:52:09 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5FAD416A4CE for ; Fri, 20 Aug 2004 14:52:09 +0000 (GMT) Received: from web51603.mail.yahoo.com (web51603.mail.yahoo.com [206.190.38.208]) by mx1.FreeBSD.org (Postfix) with SMTP id A0D3E43D46 for ; Fri, 20 Aug 2004 14:52:08 +0000 (GMT) (envelope-from jay2xra@yahoo.com) Message-ID: <20040820145201.68204.qmail@web51603.mail.yahoo.com> Received: from [210.23.172.236] by web51603.mail.yahoo.com via HTTP; Fri, 20 Aug 2004 07:52:00 PDT Date: Fri, 20 Aug 2004 07:52:00 -0700 (PDT) From: Mark Jayson Alvarez To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Humble questions for web developers in freebsd. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 14:52:09 -0000 Greetings, I have installed the latest Apache http server for the first time and I have just started programming perl cgi scripts as well. It didn't brought me any trouble installing it, but when I wrote my first "Hello World" cgi script, I end up with an internal server error. Eventually (through a very intensive, sleepless researching), I was able to run it successfully in a browser after changing its mode to 755(whiew!). Questions: 1. Do I always have to do this for every script that I would make? I thought, apache web server will know how to execute those files if it sees something like #!/usr/local/bin/perl in the beginning of the file. 2. I'm having a small clue on this one. The perl book("Beginning Perl") told me that in a default installation, apache is started by "nobody"(after running"ps -aux |grep httpd", I can see at least five httpd processes run by nobody and one that is run by me(root).) --if it is run by nobody, then it can't run the cgi script I have written right? Elucidate me please. (And also those 5 nobody's) Few perl/html questions(...related to freebsd :=): 1. (hmm.. just curious) Can't I start writing a perl program or just a plain text file that already has a 755 mode?(ex: vi -m 755... hello.plx) 2. Do you know how can I run a perl program in freebsd without having it preceded with the word perl? (I tried changing its mode to 755 and also putting it to /usr/local/bin but it didn't work(don't laugh at me please.. I'm still learning:=). 3. If you happened to be one, I'm already having a picture of how web developers are creating web pages or cgi scripts(because the whole apache directory is owned by the root, they would have to write them outside and then transfer them inside when they are finish, am I correct?? Because what I did was, change the ownership of the entire apache directory for me to be able to save an html file or a cgi script in it... 4. Do you happen know any good link where I can learn how to write shell scripts so that I may be able to start an application at boot time by putting it in "/usr/local/etc/rc.d" (ex: httpd) I'm just a fresh graduate and I'm still learning many things by myself in preparation for future career in IT. it's a sad fact, but I may have to admit that my professors in college have just thought us the "basics" in our field. Any help coming from you would be very much appreciated... And again, thanks a lot. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com