...
I loaded a simple script to just test things out (one that just prints out
environment variables) and it will not run. When I try to bring up the
script I get:
What command line are you using?
Forbidden
You don't have permission to access /hck/cgi-bin/printev.cgi on this server.
What permissions do you have on the directory /hck/cgi-bin, the directory /hck, and the root directory?
Also, who owns (user and group) the file and each parent directory going up?
Since the message is about access, I would expect the problems to be something in permissions and user/group. However, I'll add the following comments to what the others have said:
----------------------------------------------------------------------- -----
----
Apache/1.3.26 Server at eagle Port 16080
I set the permissions to 755 for the script,
I prefer to use 750, making sure the script is owned by the www group, myself. But the looser permissions should give you access, if the elements of the path up the line are accessible.
and the folder is web accessible because html files open up fine from that location.
As has been pointed out, script and hypertext access are set set separately. Since you call the directory /hck/cgi-something, I assume this directory is for scripts, and you are keeping the scripts and html separate. That's good.
But in that case you wouldn't want html files in that directory accessible to the web.
When I make
a terminal connection and try to run the script from the command line, it
will not work either.
What's the system's complaint?
I think it may be a more fundamental problem, such as needing to edit
something in their httpd.conf file or needing to enable something else on
the server so that perl scripts will be executed. They have never runs
scripts before, so nothing has every been set up for this.
My memory is that ... . Wait, I have the client version, not the server version, so I couldn't say for sure whether the primary script directory is enabled in httpd.conf in your case. In any case, /hck/cgi-bin is most likely not enabled for scripts. As mentioned, you need a section in httpd.conf that looks something like
ScriptAlias /cgi-bin/ "/hck/cgi-bin/"
<Directory "/hck/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory>
to allow access from the web. You'll also may need to set up httpd.conf to allow access from the high port. I think a "listen" line may be enough to get you started, although you may have to do more than that before you go to production.
I would appreciate any suggestions you have for this problem, especially an
idea of what configurations are needed the first time to get an OSX server
to execute perl scripts.
Well, read the comments in httpd.conf carefully. We only have vague guesses, since we don't know your setup. In case you aren't aware, Apple leaves the on-line manual accessible where the apache foundation folks were thoughtful enough to put it, at
http://localhost/manual/
Joel Rees