Note that there are some explanatory texts on larger screens.

plurals
  1. POStandards for infrastructure in cgi-bin directory
    text
    copied!<p>I'm maintaining some CGI web applications, which I'm migrating to a new Linux web server, on which I have a non-admin account, say <code>www_maintainer.</code> So I am installing the CGI applications inside <code>/home/www_maintainer/</code>, and I'd like to take the opportunity to clean things up, in particular the <code>cgi-bin/</code> directory could be better organized; I'd like to learn about a best-practice standard for that.</p> <p>For instance, is it normal to have subdirs called <code>bin/</code> and <code>lib/</code> inside <code>cgi-bin/</code>, with the binaries and libraries of auxiliary things? </p> <p>I will describe a specific example, namely with the math- and data plot application <a href="http://www.gnuplot.info" rel="nofollow">gnuplot</a> and its dependencies (libfontconfig, libpng , libgd, libjpeg, libreadline.so, ...).<br> Python could be another example (the distro provides 2.4 but I need >2.6), however I hope the admin can install 2.6 from a package so I don't have to worry about it.</p> <p>The new web server has <a href="https://www.scientificlinux.org/" rel="nofollow">Scientific Linux</a> (SL), which is based on Redhat RHEL. Unfortunately the distro repository for our current SL version does not provide gnuplot version 4.4 which I need, so it cannot be installed in the normal place like <code>/usr/bin/</code>, so I could build and install it and its dependencies in a non-system location, for example <code>cgi-bin/tools/</code>. The actual CGI web applications are binary executables launched by the scripts <code>launch1.sh</code> or <code>launch2.sh</code>. </p> <p>Here is a illustration of the directory tree and some of the files in there (many dirs and files omitted of course).</p> <pre><code>cd /home/www_maintainer/www_root/ |-- html/ | |-- index.html | `-- info.html |-- cgi-bin/ | |-- gen/ | | |-- status.sh* | | `-- sybase/ | | `-- DataAccess64/ | | `-- ODBC/ | | |-- lib/ | | |-- samples/ | | `-- spl/ | |-- exe1/ | | `-- launch1.sh* | |-- exe2/ | | `-- launch2.sh* | |-- javascript/ | | `-- check-input.js | |-- scripts/ | | |-- decode.pl* | | |-- generate-random-string.bash* | | |-- gnuplot -&gt; ../tools | | `-- upload.php* | |-- tools | | |-- bin/ | | | |-- gnuplot* | | | |-- python -&gt; python2.6 | | | |-- python-config -&gt; python2.6-config | | | |-- python2.6* | | | |-- python2.6-config* | | | `-- xmlwf* | | |-- etc | | | `-- fonts/ | | |-- include/ | | |-- info/ | | |-- lib/ | | | |-- libfontconfig.so | | | |-- libpdf.so | | | |-- libreadline.so | | | |-- libpng15.so | | | |-- libpng15.so | | | |-- pkgconfig/ | | | |-- libpng.so | | | |-- libjpeg.so | | | |-- libreadline.so | | |-- libexec/ | | |-- man/ | | `-- share/ |-- tests/ | `-- results/ | `-- info/ | |-- readme.pdf | `-- readme.html |-- fonts/ |-- index.html -&gt; html/index.html |-- log/ | `-- log.txt `-- tmp -&gt; /tmp/ </code></pre> <p><br> Would it be better to install outside the <code>www_root</code>, e.g.in the directory <code>/home/www_maintainer/bin/</code> and <code>/home/www_maintainer/lib/</code> and configure the web server to allow that?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload