Stack Exchange Network

Stack Exchange network consists of 174 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]

Cgi is the common gateway interface, used for interactive webpages.

0
votes
1answer
8 views

What can be a FastCGI client?

fcgiweb is a server based on FastCGI protocol. What can be a FastCGI client? Is a CGI script a FastCGI client, or is a web server (e.g. Nginx) a FastCGI client? Thanks.
0
votes
0answers
24 views

Apache 2.4 on Windows logs “Request exceeded the limit of 10 subrequest nesting levels” error when using git-http-backend

I set up Apache 2.4.35 on a Windows Server 2008 machine and configured it for git-http-backend. Things seem to work but the error messages in the log bug me. The question: what is causing this, do ...
0
votes
0answers
90 views

wordpress 500 (internal server error) sending request to load-scripts.php

I'm facing a problem for days now, Each time I try to edit a page with Thrive Architect I get 500 (Internal Server Error). I get this on the page: Internal Server Error The server encountered an ...
0
votes
0answers
41 views

Use existing response body for CGI HTTP errors (Tomcat 8)

We are using a custom servlet in Tomcat via the org.apache.catalina.servlets.CGIServlet class. Everything seems to be going fine so far - we can access the required endpoint. However, the program ...
0
votes
0answers
103 views

How can I configure Nginx to use PHP in CGI-mode?

The Nginx tutorial shows PHP 5 being used in FastCGI mode on Windows, but PHP 4 doesn't support php-cgi.exe so it must be run in traditional cgi mode, There are two ways to set up PHP to work with ...
0
votes
0answers
69 views

SetEnvIf doesnt work from htaccess

I'm trying to overcome the infamous missing Auth header problem with Apache, PHP and CGI. If I set this in a virtual host, I can successfully read the Bearer token from the Authorization header. ...
0
votes
1answer
138 views

ERROR: (gcloud.app.deploy) - python script

I am trying to deploy a python application and I am receiving the following error message: ERROR: (gcloud.app.deploy) Error Response: [4] Your deployment has failed to become healthy in the ...
0
votes
0answers
78 views

Apache2 - CGI transparent pass-through for both STDIN and STDOUT

I'm trying to run a CGI application via Apache2, with the goal of Apache2 launching the application and then simply passing data back and forth for as long as the CGI keeps running. This is a custom ...
0
votes
0answers
89 views

How does apache choose the executable for a cgi script?

I've been doing some experiments, and trying to understand the results. In my apache conf I have: balter@balterbox:/etc/apache2$ cat sites-enabled/000-default.conf . . . <Directory /var/...
0
votes
0answers
308 views

File upload with Flask app in Apache - Http 400 is returned

I am using cgi to deploy the Flask app in Apache 2.4. The app is deployed and works fine, I can render the pages and download reports and other stuff. But I can't upload any file. In my local, it ...
0
votes
0answers
250 views

Docker with nginx and Python CGI through uWSGI

I have set up a Docker container with nginx and uWSGI. Below is my /etc/uwsgi/apps-enabled/cgi.ini file: [uwsgi] plugins = cgi socket = 127.0.0.1:9000 cgi = /cgi-bin cgi-allowed-ext = .py And below ...
0
votes
1answer
1k views

APACHE SetEnv directive (from .htaccess) not send to CGI process

I don't understand Apache2 mecanism in this scenario : 1/ In this location : var/www/cgi-bin/ (user's group rights : www-data) i've a CGI script (php-cgi) who will execute PHP app + VAR environement ...
1
vote
1answer
38 views

how to disable a spcific cgi page in apache?

I have an Apache server that hosts multiple sites, one of them use CGI, one of them does not. While security scanning this non-CGI site was flagged in the tool for security review for a CGI page. I ...
0
votes
0answers
143 views

Apache2.4 only recognizing index.py

I've changed some settings on my apache server to get index.py to show up when I go to http://localhost/index.py. I'm keeping index.py in the folder /var/www/test/. However, whenever I try to add ...
0
votes
0answers
72 views

A script runs via localhost but not via 127.0.0.1

I am trying to migrate some software from apache 2.2 to 2.4. I have it working - almost. When accessing the server via address localhost things work, but when trying to access via 127.0.0.1 some ...
0
votes
1answer
330 views

Different PHP modes for Apache Virtual Hosts

I got LAMP stack installed on Centos 7. Also I have three CMS up and running on httpd virtual hosts: WordPress, Joomla and OpenCart. The question: how to configure different PHP modes, CGI and FCGI ...
0
votes
0answers
321 views

How to configure .htaccess to run JavaScript with node as CGI

I'm testing this on my linux localhost. This is what I'm trying: balter@spectre:/var/www/html$ cat .htaccess Action cgi-node "/usr/bin/env node" AddHandler cgi-node .js balter@spectre:/var/www/html$...
-1
votes
2answers
398 views

.htaccess vs php.ini in mod_php and CGI

As far as I know, mod_php can be configured either by means of php.ini or .htaccess files while, for CGI, .htaccess files cannot be used. Does the fact that mod_php can use .htaccess files makes it ...
2
votes
1answer
361 views

Nginx and fcgiwrap, incremental output problems

When I run a cgi script under Apache any output is rapidly sent to the client. However when I run it under nginx with fcgiwrap it seems nothing is sent to the client until the script either finishes ...
-4
votes
1answer
66 views

Issue with high server load centos

I'm having some major issues with one of my servers. Server load is extremely high: load average: 142.28, 144.80, 139.6 The server is running Centos 6 and has a Perl image sharing script running on ...
1
vote
0answers
90 views

Unable to run cgi script

I've installed backuppc on a fresh Xubuntu. Everything went fine except that when I try to access the web interface, instead of running the CGI script I'm prompted to download a bin file. I'm no ...
0
votes
2answers
98 views

Why is Apache returning characters “MZ” for any .lc URLs

I have just installed Apache 2.4 on Windows Server 2016 Datacenter (AWS EC2 instance). Web server seems to be working fine, I can access 'http://localhost/' and get the 'It Works!' page. Location: C:\...
0
votes
1answer
413 views

CGI stopped working on setting Nginx as reverse proxy for apache

So I am running a site www.example.com. Initially, I was using apache and any hit to my site would be redirected to www.example.com/path. Now this redirection is defined in my httpd.conf like: ...
1
vote
0answers
353 views

Apache:How to config for php-cgi.exe

I have configured apache for using php-cgi as follows: <Directory "c:/wamp64/cgi-bin"> AllowOverride All Options +ExecCGI AddHandler cgi-handler .php Action cgi-handler /local-...
-1
votes
1answer
488 views

How does Apache spool STDOUT from a CGI script?

As part of a content management system I'm developing I have a script which retrieves image files (JPEG, GIF, PNG etc) in response to the browser GETing a URL like http://myserver/getimage.cgi/virtual/...
1
vote
1answer
629 views

Apache 2.4 separate error log file for CGI scripts?

I am using Apache 2.4 on my server and I want to be able to have a separate error log file for CGI scripts, similar to how I have a separate log file for PHP errors. Currently, I am using the ...
0
votes
2answers
691 views

CGI errors (Can't open perl script / Permission denied)

OS: CentOS 7 / Apache: 2.4 I'm upgrading machines and software, part of which has involved upgrading from Apache 2.2.x to Apache 2.4.x. A good portion of it works okay, inlcuding PHP scripts, and ...
0
votes
2answers
1k views

Why CGI is not working in apache

I have got url like this: http:// ipadress/project/cgi/sessionlogin.cgi?login=usernmae&password=somepass but when I open this url I see download action of cgi file, not a results. I have ....
2
votes
1answer
1k views

Returning HTTP status 204 for GET /generate_204 using uhttpd?

To deal with the Android captive portal detection for my specific setup, I need to return an HTTP status code 204 whenever I get a GET request for /generate_204. I currently use uhttpd as my webserver,...
1
vote
0answers
278 views

Set up Bugzilla on IIS 10 with FastCGI

I'm a bit of an IIS noob so apologies if this is vague. I've successfully set up Bugzilla on IIS 10 but it's pretty slow - a few seconds to load each page even on the same local machine. As I ...
0
votes
1answer
262 views

Apache: Log messages from CGI to own file

I would like to have all the output from the (perl) CGIs in its own log file. What i tried: Setting ScriptLog /var/log/httpd/cgi.log in httpd.conf, but this had no effect. Probably something else is ...
0
votes
2answers
909 views

Calling CGI python script as root from a web form

I'm having difficulty getting a web form to run a CGI script that needs to perform a command with root permission. The form is: <form class="mainform" action="./py/print_msg.py" method="POST"> ...
0
votes
1answer
564 views

Centos trying to execute hello.cgi script fails

I'm trying to execute a simple hello world cgi script in the html directory but it fails. Error log: [Tue May 17 14:56:15.744954 2016] [cgi:error] [pid 29997] [client 192.168.1.1:16151] End of ...
1
vote
0answers
191 views

issue with Apache and CGI script

I have one interesting issue with Apache and CGI scripts. When I make request to CGI script in following format: /cgi-bin/myscript.sh/myscript.params, apache firstly checks that there allowed query ...
1
vote
2answers
751 views

Running a Python script which saves files to server with cgi and apache2 version 2.4

I have a python script (python.py) located in the /var/www/html/Python folder. The script saves some images to another directory (/var/www/html/Data) I have the -x file permission on the python.py ...
1
vote
0answers
39 views

Clean way to run Perl CGI script on Mac?

I'm trying to run a server to serve a Perl file on my Mac, but I'd like to not use Apache and its CGI. Is there a clean way, a la Python's SimpleHTTPServer, to run Perl without mucking with Apache?
0
votes
1answer
92 views

Moving cgi script from Apache 2.2 to 2.4 results in a 403 error

My configuration is as follows: #Include for LinuxStat (http://lstat.sf.net) Alias /lstat/ "/usr/local/lstat/www/" <Directory "/usr/local/lstat/www/"> #for execute CGI files Options ExecCGI ...
0
votes
1answer
471 views

VirtualHost DocumentRoot cgi goes to `/var/www`

I have an apache based web server I am called to do some maintenance on a few times a year. For this purpose I keep a local mirror so I can do what's required then upload the changes. I haven't used ...
4
votes
3answers
17k views

Run Perl CGI Scripts On CentOS 7 With Apache/Httpd

My CGI Perl scripts CentOS 7 are not running correctly, they are either showing up as plain text or I am getting a server error. I've been placing my scripts into the default /var/www/cgi-bin ...
0
votes
1answer
274 views

Apache 2.4 Ubuntu access denied for cgi-bin

I have the following apache configuration: DocumentRoot "/var/www/html" ScriptAlias /cgi-bin/ /var/www/cgi-bin <Directory "/var/www/cgi-bin"> AllowOverride None AddHandler cgi-...
1
vote
0answers
82 views

Simultaneously enable gzip and $STR_REPLACE in CGI in apache

I have a code in my CGI script for text replacement (for example replace 'red' with 'blue') $STR_SEARCH='red' $STR_REPLACE='blue' I am using the below code in .htaccess for enable replace function: (...
1
vote
1answer
587 views

Nginx serving C++ cgi script: response is binary format

I am trying to run C++ CGI script on nginx. I am using FCGIWrap with script from nginx website. The program code is like this: #include <iostream> using namespace std; int main () { cout &...
2
votes
1answer
43 views

Modify file before sending to cgi handler

I'm making a portable installation of Apache to run Bugzilla. This installation has a portable version of Perl and it's the one I want mod_cgi to use. However, mod_cgi doesn't have any way to ...
0
votes
0answers
105 views

iptables, Apache2 and cgi

I'm running Perl cgi script providing some reports on Apache webserver on a host behind DSL modem doing port forwarding. Overview: net <-> DSL_Modem (192.168.1.254) <-> Ap2host (eth1/192....
1
vote
0answers
44 views

Random newlines in CGI warnings written to the Apache error log

Since upgrading a server from Debian 7.8 to 8.2 (64-bit) the Apache upgrade (to 2.4.10) has introduced a very strange fault: random newlines in error_log. Example: [Mon Nov 16 13:29:54.388526 2015] [...
0
votes
1answer
907 views

Forbidden Access. CGI -apache

I am trying to run a cgi script using apache but when I input in the browser https://localhost/cgi-bin/(anything) it says "You don't have permission to access /cgi-bin/(anything) on this server. I ...
2
votes
0answers
291 views

Inconsistent “unable to open database file” error from a CGI program using SQLite

I've been running a task program for a psychology experiment on my virtual private server with lighttpd 1.4.28 and Ubuntu 12.04. The experiment is a CGI program written in Perl using a Perl module I ...
0
votes
0answers
170 views

IIS-8 - Python CGI needs to access a library outside of the web directory structure

I've got a python script that calls a dll in a directory off of C:\ (ctypes module). When I access the script, the errror I get back is in <module> mydll = ctypes.cdll.LoadLibrary("C:\\DIR\\...
1
vote
1answer
51 views

mod_rewrite not working on web root dir

With the Apache/mod_rewrite config below i get a 403 forbidden error for any CGI scripts on the root /var/www/ I don't get any error for static files. Scripts out of root dir i.e. /var/www/random/...
4
votes
3answers
2k views

Can I detect when a client has disconnected from a CGI?

I have a rather resource intensive CGI that takes quite a long time to start sending data. We've seen quite a few cases where impatient people reload a couple of times, which then triggers additional ...