[cs631apue] Clarification on CGI
Jan Schaumann
jschauma at stevens.edu
Thu Nov 27 21:51:36 EST 2014
sshah83 <sshah83 at stevens.edu> wrote:
> How would CGI work with ~<username> feature for example
> ~username/cgi-bin/..? The docroot for files is ~username/sws should we
> assume something similar for cgi with ~username?
>
> I am currently assuming that when ~username is provided cgi is not
> supported.
That's reasonable.
You may also choose to interpret the directions such that if the
directory given to '-c' is a relative path, that it should be taken as
underneat the document root or underneath the ~-expanded directory.
For example, if I ran
./sws -c cgi-bin -d /somewhere
then
http://localhost:8080/cgi-bin/foo
would be treated as '/somewhere/cgi-bin/foo' and
http://localhost:8080/~alice/cgi-bin/foo
would be reated as '$ALICEHOME/sws/cgi-bin/foo'.
If the argument to '-c' is an absolute path, then there is no directory
under ~user that would be a cgi directory.
Either approach would be fine.
-Jan
More information about the cs631apue
mailing list