Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cgi]

The tag has no usage guidance.

0
votes
0answers
5 views

python cgi file is inaccessible by apache2

I have setup a .conf file to allow the use of python cgi by adding <Directory "/home/main/code"> Options +ExecCGI AddHandler cgi-script .py </Directory> and I made the python ...
0
votes
1answer
77 views

Print the output of an interactive command in a shell script

I am writing a CGI script to monitor the system state, so the information must be outputted to the terminal with echo or cat. The problem is, systat is an interactive command, so it doesn't print ...
0
votes
0answers
29 views

what is the protocol used between fcgiwrap and Nginx

When fcgiwrap is used together with Nginx to serve CGI or Perl scripts (.cgi), which is the protocol used between fcgiwrap and Nginx, http or fastcgi? What protocol is used when fcgiwrap invokes a ...
0
votes
0answers
16 views

Why is gitweb.cgi run when URL doesn't contain its filename, and downloaded when URL does?

https://gist.github.com/mcxiaoke/055af99e86f8e8d3176e set up a website as follows: server { # Git repos are browsable at http://example.com:4321/ listen 4321 default; # Remove 'default' from ...
1
vote
1answer
34 views

How to get php-cgi with phpbrew (PHP5.3.x)

I installed php-5.6.40 php-7.1.14 with phpbrew and I've got php-cgi binaries on these both version. I used this command for get php-cgi 5.6.40 phpbrew install 5.6.40 +default+fpm+mysql+sqlite+mb+...
0
votes
0answers
109 views

How to execute a cgi pointed to by a symlink?

My website has several cgi's (executable binaries compiled from C source, in case that matters) that work fine when run from a browser as, e.g.,       http://mydomain.com/cgi-bin/...
2
votes
1answer
258 views

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|...
0
votes
1answer
154 views

Perl CGI, using system() to launch ssh and pass sanitized variables

I'm looking for a way to have perl launch a program with variables taken from the previous webpage. Here's my horrible perl code: #!/usr/bin/perl -w use CGI qw(:standard); use CGI::Carp qw(...
0
votes
1answer
390 views

Scipts cgi and suexec

I have a httpd server SuexecUserGroup netmet netmet DocumentRoot /home/netmet/html ServerName ServerAdmin ErrorLog /var/log/httpd/netmet.error TransferLog ...
1
vote
1answer
308 views

Unable to run a .py file in cgi-bin by using ajax call from my .php file

Hi guys:) I am using a Beagle Bone Black with Debian Wheezy to make a project. I have a small problem:I have my index.php in /var/www from there I call a python file called send_email.php using ajax: ...
2
votes
0answers
245 views

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 ...
4
votes
1answer
691 views

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" ...
1
vote
1answer
708 views

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/ <Directory /home/router/cgi-...
1
vote
2answers
198 views

Apache CGI Workflow

I am trying to understand the workflow for CGI. So for example, say I use a unix shell script with CGI, what will be the sequence of steps executed to run this script when a client sends a request to ...
0
votes
2answers
316 views

Apache 2.4.10 page not displayed

I'm not a big expert in Apache and I facing with a particular problem. I have 2 server where in the first I run Debian 7.9 with Apache/2.2.22, in the other one I have Debian Apache/2.4.10. In both ...
1
vote
1answer
347 views

CGI error while trying to retrieve from sqlite3

I am trying to build a very simple login page, which asks the user for his register_no, username and password. And when he presses the submit button. I am trying to check whether it is an existing ...
0
votes
0answers
3k views

Testing shellshock with CGI [duplicate]

I am trying to test the shellshock bug with CGI. I have a simple CGI script: #!/bin/bash echo "Content-type: text/plain" echo echo echo "Hello World" I trigger the script as follows, and the page ...
0
votes
1answer
93 views

Does Basic “hello world” run as CGI.?

My question is simple. I install apache on centos and create a file as index.html and just add the content of "hello world". Now, when I access my web it display the "hello world" quote. My question ...
1
vote
1answer
538 views

Verbose output missing when executing a script as CGI

This is my shell script #!/bin/bash echo "Content-type: text/plain" echo "" sshpass -p $pass ssh -v -p $port -t -o StrictHostKeyChecking=no root@$ip "cd / && ls && exit" It can be ...
3
votes
1answer
17k views

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 ...
1
vote
1answer
469 views

chroot cannot find cgi file

I am unable to serve or execute a cgi file, and the cause seems to be that chroot is unable to find the cgi file when the permission is set to executable. $>ls -l /var/www/my/dir/test.cgi -rwxr-xr-...
0
votes
1answer
258 views

How to pass parameters in a cgi-perl on Fedora 20?

I'm using Apache server on Fedora-20. I'm trying to run a perl-cgi program on my local server, but it's not working, I have attached my html and perl code. html program: <html> <head><...
0
votes
1answer
297 views

lighttpd2 and php under fast-cgi returns 403 “Permission denied”

lighttpd2 is under development but it's faar enough to where i want to start using it. I've overcome the hurdle of installing it and getting vhost etc working. PHP 5.6.6 (cgi-fcgi) (built: Feb 20 ...
1
vote
3answers
2k views

Cannot run Perl code as CGI script

I am using Arch Linux with httpd web server and webpage works ok. I had to add "Reboot" button on webpage and now I want to run a Perl CGI script, reboot.cgi, which so far only contains "Hello world" ...
0
votes
0answers
393 views

How to grant sudo permission for a .py script on a apache folder?

I've exemplo.py in an folder /opt/lampp/htdocs/cgi-local/exemplo.py folder. The script creates a socket that needs super user permissions. My question was a little confusing? I need to access ...
2
votes
0answers
101 views

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 ...
1
vote
1answer
103 views

www server restart after upgrading bash regarding the shell shock bug?

If a webserver uses CGI with bash, does it calls bash every time when there is a request regarding CGI or does it caches (bash and related libraries) it when starting the webserver? Q: So is a ...
-4
votes
1answer
141 views

Reboot shortcut

I need to haved a shortcut on my desktop to a URL which reboots my debian server and then says "reboot successfull" in the browser, if that was the case. I do not want a putty reboot shortcut or ...
1
vote
1answer
2k views

How to ensure a bash script is executable via web without being in /cgi-bin directory?

My document root is /0/ i do not have any cgi-bin directories. this is my virtual host with apache: Listen *:80 DirectoryIndex 1 <VirtualHost *:80> DocumentRoot /0 ServerName domain.tld ...
2
votes
0answers
8k views

Apache install on Debian: configuring CGI [closed]

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: <VirtualHost *:80> ServerAdmin ...
0
votes
1answer
636 views

Automatic login for mysql used in CGI script

I have written a CGI script using bash which executes a MySQL query. For MySQL authentication , automatic login is used by supplying the credentials in .my.cnf file as shown below . # the following ...
2
votes
1answer
752 views

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 ...
2
votes
1answer
20k views

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 "<html>" echo "<body>" ...
3
votes
2answers
4k views

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-...
2
votes
1answer
265 views

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 ...
-1
votes
2answers
14k views

how to run perl cgi script on apache [closed]

I Successfully installed Apache web server in my local machine. My question is how to run perl cgi script on this server Actully I don't have any Idea that's why posted question here. my sample cgi ...
0
votes
2answers
4k views

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 ...
2
votes
1answer
2k views

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 ...
1
vote
1answer
899 views

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 <html><body> <form action=FOO.KSH method=POST> <input type=submit value=fgrep style=width:...
1
vote
1answer
525 views

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 ...