Posts

Showing posts with the label cgi

Management console.

Image
Originally I was looking for a script that I could use via the web to manage a machine. Really did not find anything, but after backdooring into a script from searching the www.archive.org, this is what I came up with. The original code was only about ten lines or so, but what a script. You can find the details at: http://www.instructables.com/id/Simple-linux-commands-from-a-web-page

CGI rocks.

Image
The CGI (Common Gateway Interface) defines a way for a web server to interact with external content-generating programs, which are often referred to as CGI programs or CGI scripts. It is the simplest, and most common, way to put dynamic content on your web site. The main point of this is that you can use your own programming interface to push or pull data from a web page. Cgi install in part. assuming apache2 is already installed. $ sudo apt-get install libapache2-mod-perl2 $ sudo a2enmod cgi $ sudo service apache2 restart For example I like to use Freebasic to control ports for automation. The cgi interface allows me to do that. Actually what I wanted to talk about is changing the directory where you usually store the files. Here is a typical entry for cgi scripts location. ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> Options +ExecCGI AddHandler cgi-script .cgi .pl Options FollowSymLinks Require all granted...