I have been trying to port some of my bash shell cgi-bin scripts to the XiVO platform.
I have tested the simple script and HTML file below on my FreePBX/Incredible RPi-3 and FreePBX/Incredible CentOS. If this won't work, no need to go any farther.
My RPi-3 is running Debian(FreePBX) so the CGI-BIN is in /usr/lib/cgi-bin location which is the same as my VirtualBox XiVO.
On my VirtualBox XiVO:
I checked for the 'ScriptAlias' and '<Directory> ... </Directory>' for cgi-bin.
These are commented out on the /etc/apache2/conf-available/php5-cgi-bin.conf file.
I un-commented them and rebooted the server but still no luck running the bash shell and/or proccgi.c programs.
I even moved the lines to a new .conf file to see if that would work but no such luck.
I am probably just missing something simple in the conf files, but I have not found it yet.
I have been trying for the last 2 weeks before I finally gave in and posted this request.
I am no expert in Apache2 configurations so I am currently at a loss as to what needs to be updated to allow actual programs to run in /usr/lib/cgi-bin and descending directories.
These are a stripped down set of files that run on the RPi-3 FreePBX but not on the XoVO.
I use the following 'testit.html' file in /var/lib/html directory:
I use the following 'testit.sh' file in /usr/lib/cgi-bin directory:
BTW:
What file ownership(s) and permissions(of course execute) should files be given in the XiVO cgi-bin?
What user/group is running Apache2/HTTP?
What command do you use on XiVO to restart Apache?
Any assistance is greatly appreciated!
Thanks,
TomS
[email protected]
I have tested the simple script and HTML file below on my FreePBX/Incredible RPi-3 and FreePBX/Incredible CentOS. If this won't work, no need to go any farther.
My RPi-3 is running Debian(FreePBX) so the CGI-BIN is in /usr/lib/cgi-bin location which is the same as my VirtualBox XiVO.
On my VirtualBox XiVO:
I checked for the 'ScriptAlias' and '<Directory> ... </Directory>' for cgi-bin.
These are commented out on the /etc/apache2/conf-available/php5-cgi-bin.conf file.
I un-commented them and rebooted the server but still no luck running the bash shell and/or proccgi.c programs.
I even moved the lines to a new .conf file to see if that would work but no such luck.
I am probably just missing something simple in the conf files, but I have not found it yet.
I have been trying for the last 2 weeks before I finally gave in and posted this request.
I am no expert in Apache2 configurations so I am currently at a loss as to what needs to be updated to allow actual programs to run in /usr/lib/cgi-bin and descending directories.
These are a stripped down set of files that run on the RPi-3 FreePBX but not on the XoVO.
I use the following 'testit.html' file in /var/lib/html directory:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- GPL-3 2016 by Tom Schmitt [email protected] -->
<!-- testit.html calls testit.sh -->
<html>
<HEAD><TITLE>testit.sh</TITLE></HEAD>
<body>
<form action="cgi-bin/testit.sh" method="post">
<b><u><i>Test-It Script</i></u></b>
<br><small><small><small><b>
</small></small></small>
<br><input type="submit" value="Submit">
<small><small><small>
<br><br>FORM /var/www/html/testit.html CALLS cgi-bin/testit.sh
<br>by Tom Schmitt (testit)
</small></small></small>
</form>
</body>
</html>
I use the following 'testit.sh' file in /usr/lib/cgi-bin directory:
Code:
#!/bin/bash
#ident "@(#)testit.sh Ver. 1.0 Tom Schmitt 2016"
# Purpose of this script:
# To verify that the Apache configuration allows execution of
# .sh and .c files from the 'cgi-bin' directory.
# This is done with almost pure HTML code.
# Locations:
# Place this testit.sh in:
# /var/www/cgi-bin directory (CentOS) or
# /usr/lib/cgi-bin directory (Debian)
# Place 'testit.html' in /var/www/html directory.
# Access the web page: http://<server-ip>/testit.html
# Try it: Click 'Submit' button
# Returns: 'Hello World from testit.sh'
PGM=`basename $0` # This script's name
cat <<!
Content-type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body>
<pre>
<small><b>
Hello World from $PGM
<br>PWD = `pwd`
<br>`id`
</b></small>
</pre>
</body>
</html>
!
BTW:
What file ownership(s) and permissions(of course execute) should files be given in the XiVO cgi-bin?
What user/group is running Apache2/HTTP?
What command do you use on XiVO to restart Apache?
Any assistance is greatly appreciated!
Thanks,
TomS
[email protected]