It is clear now.<br><div>Thanks<br><div><br><div class="gmail_quote">2012/12/12 Jan Schaumann <span dir="ltr"><<a href="mailto:jschauma@stevens.edu" target="_blank">jschauma@stevens.edu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Chao Cui <<a href="mailto:ccui1@stevens.edu">ccui1@stevens.edu</a>> wrote:<br>
> $ pwd<br>
> /home/jschauma<br>
> $ sws -c ./sws/cgi-bin ./sws<br>
><br>
> HTTP request       absolute pathname<br>
> ------------------------------------------------------------------------<br>
> /                   /home/jschauma/sws/index.html (or directory listing)<br>
> /cgi-bin/foo        /home/jschauma/sws/cgi-bin/foo<br>
><br>
> Above is a example you gave to us.<br>
<br>
</div>Ok, let's use that as the correct definition, then. :-)  This is the way<br>
that most other web servers handle this, too, so let's be consistent.<br>
<br>
That is:<br>
<br>
- a client request for a CGI must begin with "/cgi-bin"<br>
- the remainder of the resource path given by the client is resolved<br>
  relative to the directory given to the server's "-c" flag<br>
<br>
Examples (in addition to the above):<br>
<br>
$ sws -c /var/www/cgi-bin /var/www/sws<br>
<div class="im"><br>
HTTP request       absolute pathname<br>
------------------------------------------------------------------------<br>
</div>/                   /var/www/sws/index.html (or directory listing)<br>
/cgi-bin/foo        /var/www/cgi-bin/foo<br>
<br>
<br>
$ pwd<br>
/tmp<br>
$ sws -c ./dir ../usr/local/htdocs<br>
<div class="im"><br>
HTTP request          absolute pathname<br>
------------------------------------------------------------------------<br>
</div>/dir                  /usr/local/htdocs/dir (or directory listing)<br>
/cgi-bin/dir          /tmp/dir/dir<br>
/cgi-bin/subdir/file  /tmp/subdir/file<br>
<br>
<br>
I've updated the manual page accordingly.<br>
<br>
I hope this clears up the confusion and makes things simpler.<br>
<div class="HOEnZb"><div class="h5"><br>
-Jan<br>
_______________________________________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/cgi-bin/mailman/listinfo/cs631apue" target="_blank">https://lists.stevens.edu/cgi-bin/mailman/listinfo/cs631apue</a><br>
</div></div></blockquote></div><br></div></div>