On Tue, Jan 10, 2012 at 3:27 PM, Thomas Stover <[email protected]> wrote:
> > -althttpd looks for directories that end with the .website suffix, and > defaulting to default.website. So create one or more directories like > this /repos/project1.website /repos/project2.website, which will then > corrispond to the URLs https://domainname/project1, and > https://domainname/project2. Actually, the /repos/project1.website responds to https://project1/ and /repos/project2.website is used for https://project2/. Any non-alphanumeric characters in the domain name are converted to _. Hence, the directory used by http://www.fossil-scm.org/ will be /repos/www_fossil_scm_org.website. If you allow multiple URLs for the same website (ex: http://fossil-scm.org/ and http://www.fossil-scm.org/) then make /repos/fossil_scm_org.website a symbolic link that points to /repos/www_fossil_scm_org.website. Althttpd looks at the HOST parameter of the HTTP header, converts all upper-case letters to lower-case, converts all non-alphanumeric characters to underscores, then looks to see if the resulting directory exists. If it does not, or if there is no HOST parameter in the HTTP header, then it uses the "default.website" directory instead. Both the www.fossil-scm.org and www.sqlite3.org websites are on the same althttpd server. So, for example, if you telnet to www.fossil-scm.org:80and manually enter a simple GET request, omitting the HOST parameter, then you'll get the SQLite homepage, not the Fossil homepage that you were expecting, because althttpd will use the default.website directory which contains the SQLite website not the Fossil website. > You could then create a symlink (or just > have one project as) to default.website, so one of those comes up as > just https://domainname/. > > -Inside the above directories, create fossil cgi wrapper scripts, ie > > #!/fossil > repository: /project2/project2.fossil > > -This would require the fossil executable to be at /repos/fossil, and > the fossil project file to be at /repos/project2/project2.fossil > > -If this wrapper script is name /repos/project2/foo (needs to be > executable), then the url would be https://domainname/project2/foo > If you call this CGI script "index.html" then althttpd will invoke it automatically if not script pathname is given. That is how http://www.fossil-scm.org/ works. Do not be confused by the ".html" suffix. althttpd is perfectly happy to use a file that ends in ".html" as a CGI script. Althttpd only looks at the execute permission bit. If execute permission is on, the file is CGI, otherwise it is static content. > > -Make sure there is a /tmp folder in the chroot environment for CGI > POSTs to work, ie /repos/tmp. Again check permissions. > > -Regular non-ssl http support comes from configuring inetd or xinetd. > > [email protected] 1/10/12 > _______________________________________________ > fossil-users mailing list > [email protected] > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > -- D. Richard Hipp [email protected]
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

