Questions tagged [cgi]

46 questions
4
votes
1 answer

CGI with Shell Script

I'm having trouble running a CGI example with Shell Script, I'm not able to access the directory created in the example I'm following "/tmp/shell". By accessing the address "http://localhost/shell" should see a page "Index of shel" but gives 403…
Patterson
  • 765
  • 3
  • 12
  • 25
3
votes
1 answer

Configuring Apache 2.4 to permit CGI on Debian Jessie

I’m new to Sysadmin and Apache configuration. Trying to get AWStats running, but in troubleshooting have gotten to trying to run a simple Hello World (html output) script on port 8888 and have been hitting a wall of 403 Forbidden. It’s not the…
MikeiLL
  • 247
  • 1
  • 4
  • 10
3
votes
1 answer

500:Internal Server Error from CGI program

I am trying to write a CGI Program which is invoked from a HTML page . The CGI code snippet is as follows: #!/bin/bash echo "Content-type: text/html" echo "" echo "" echo "Hi" echo "" echo "" But after executing…
Zama Ques
  • 3,186
  • 12
  • 39
  • 54
3
votes
2 answers

Unable to launch the requested CGI program: /www/cgi-bin/first.cgi: Text file busy

I'm trying to make a very simple shell script to run as a CGI on a uhttpd server running on an OpenWRT install. The file is called /www/cgi-bin/first.cgi and looks like... #!/bin/sh echo "Content-type: text/html" echo "" echo…
bigjosh
  • 589
  • 2
  • 6
  • 14
2
votes
1 answer

How to enable CGI in OpenBSD?

I installed an OpenBSD 5.3 in Virtualbox. Webserver is apache: httpd_flags="" in rc.conf. httpd.conf # cat /var/www/conf/httpd.conf …
gasko peter
  • 5,434
  • 22
  • 83
  • 145
2
votes
1 answer

How to give variable to a KSH script with a CGI?

index.sh is in the cgi-bin directory: #!/usr/bin/ksh echo 'Content-type: text/html
gasko peter
  • 5,434
  • 22
  • 83
  • 145
2
votes
1 answer

Nginx version agnostic php-fpm configuration

When I create a new webapp conf in Nginx I use the following template: server { root /var/www/html/${domain}; server_name ${domain} www.${domain}; location ~* \.(jpg|jpeg|png|gif|ico|css|js|ttf|woff|pdf)$ { expires 365d; } …
Arcticooling
  • 1
  • 12
  • 44
  • 103
2
votes
0 answers

Stream audio from bash cgi script

I have a bash script which I would like to call as cgi to stream audio. The script looks like this: #!/bin/bash echo "Content-type: audio/wav" echo "" rtl_fm -f 89.9M -M fm -s 170k -A std -l 0 -E deemp -r 44.1k exit 0 When I start it on the…
yglodt
  • 273
  • 5
  • 11
2
votes
1 answer

How to Configure CGI in Ubuntu?

I recently installed Apache2 on Ubuntu and I am trying to configure CGI. I added the following lines in apache2.conf file: ScriptAlias /cgi-bin/ /home/router/cgi-bin/ Options ExecCGI AddHandler…
2
votes
0 answers

Execute CGI scripts on custom OMAP4 board as root

I have a Ubuntu 12.04 Custom Board running Apache2. I have a web page which calls a CGI script which is responsible for starting and stopping ipsec service. I access the web page from another machine in local environment. Following is the CGI script…
2
votes
0 answers

Apache install on Debian: configuring CGI

I installed CGI via the package manager and enabled the mod, but two hours later I still cant get it to work. My /etc/apache2/sites-available/default is: ServerAdmin webmaster@localhost DocumentRoot /var/www …
2
votes
1 answer

redirection failing for CGI program

I'm trying to redirect the contents of command output to a file in a CGI program. The issue for me is that the output file is not getting created. The CGI Code snippet is as follows: #!/bin/bash echo "Content-type: text/html" echo "" echo…
Zama Ques
  • 3,186
  • 12
  • 39
  • 54
2
votes
1 answer

GoAccess won't redirect its output as a CGI script

I've been pulling my hair with this script: #!/bin/bash echo Content-type: text/html echo "" goaccess -f /var/www/log/access.log -a | tee Which runs perfectly on the command line (generates HTML output for access.log), but when I run it as a CGI…
2
votes
2 answers

Configuring Apache 2.4 for CGI on FreeBSD

I am trying to run CGI on FreeBSD 9.2. I installed Apache 2.4 (pkg install apache24) Configured it to load CGI module. Also, I did chmod a+x on files in cgi-bin directory. And when I connect to the server to a test CGI script, the server…
Eonil
  • 4,607
  • 11
  • 30
  • 30
1
vote
1 answer

Why wouldn't Perl CGI script run

I'm using Apache on CentOS and am trying to run a Perl CGI script as directory index so it will run automatically as a subdomain. I added DirectoryIndex script.cgi and added a Directory stanza noting the path /var/www/folder enabling the script to…
mike
  • 11
  • 1
1
2 3 4