Questions tagged [cgi]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

Unable to run cgi program on apache2 server (with some mod_jk configuration)

In a apache2 server which have enabled mod_jk to access tomcat10 contexts, it was also enabled and configured the mod_cgid to run programs from the folder /var/www/apps/cgi-bin. But when I try access ...
Kleber Mota's user avatar
0 votes
1 answer
25 views

Variable substitution not working in CGI script

I am trying to make a CGI script that takes the name and email from a form, decodes the QUERY_STRING variable into the two values, and then does stuff with them ( for now I just decoded the name an I ...
velici alex's user avatar
0 votes
0 answers
27 views

-CGI script not getting executed

0 I'm trying to make a simple form where you can introduce you're name and upon hitting the submit button you get redirected to a page where it says "Hello name_that_was_submited!". I did ...
velici alex's user avatar
0 votes
2 answers
87 views

Why is my browser displaying the Content-Type line?

Following what's described here --- https://httpd.apache.org/docs/2.4/howto/cgi.html --- I've created a tiny Perl document: #!/usr/bin/perl print "Content-Type: text/html; charset=utf-8\n\n";...
John's user avatar
  • 103
0 votes
1 answer
153 views

Lighttpd CGI downloads .py instead of running it

I have two CGI test scripts in lighttpd. When I open Bash http://host/cgi-bin/test.sh URL I get a valid response from the script. But when I open Python http://host/cgi-bin/test.py the file is ...
jackhab's user avatar
  • 801
0 votes
1 answer
354 views

lighttpd: ajax request prints the content of cgi script instead of running it

I am using lighttpd version 1.4.55 within an ARM environment. I created an HTML pages in which there is a button used to download some json data. This button trigger a submit form that calls a cgi ...
marco's user avatar
  • 1
0 votes
0 answers
795 views

python.exe - The FastCGI process exceeded configured activity timeout

I'm trying to host a Flask (Python) application on a Windows server, but it was giving me request timeout error, then I changed it to 300 seconds (5 minutes), and after that, it's giving me an ...
Ankit Tiwari's user avatar
0 votes
3 answers
1k views

CGI scripts: when can you return a document, instead of an HTTP response?

Script 1 below is bash, and is at https://example.com/cgi-bin/test. It produces the output 'Under construction' when fetched. It echos Status and Content-type headers, and some HTML. If I instead try ...
QF0's user avatar
  • 203
2 votes
1 answer
758 views

Accessing TP-LINK TL-SG1016PE switch behind reverse proxy

I am trying to access my switch through my Nginx reverse proxy. I can access the switch fine using the local ip over http, but when I try with the domain name through my reverse proxy with over https, ...
Remz1337's user avatar
0 votes
2 answers
882 views

Run a perl script in a browser via a link

I'm attempting to get a perl script up and running on Oracle Linux 8.5. My Apache server and virtual hosts work with static html. My test virtual host, fnu, has a very basic perl script named hw.pl in ...
SKaye's user avatar
  • 1
0 votes
1 answer
444 views

Prevent Apache2 from executing CGI in Static Directory

I am running an Apache 2 web server running on Ubuntu 20.04 LTS. I have a Python CGI handler enabled for the /var/www/html directory, which is the DocumentRoot. I am wondering how to exclude a certain ...
Noah Broyles's user avatar
1 vote
1 answer
456 views

Permission denied for gitweb.cgi on CentOS

I've set up gitweb on my web server. I have created projects on the server. I can add commits to them and also clone them remotely. The gitweb "homepage" does display and the static files ...
carlitobrigante's user avatar
0 votes
1 answer
359 views

Failed to set up Apache for executing PERL file in FreeBSD

I've successfully installed perl5 and apache24 in FreeBSD 12. Then I enabled apache24 in /etc/rc.conf and see index.html placed in the path /usr/local/www/apache24/data. Then in the file /usr/local/...
stckvrw's user avatar
  • 121
0 votes
1 answer
307 views

SCGI vs FastCGI - Which one is faster? [closed]

I want to use one of servers - libscgi and libfcgi - with dynamic content. Which one seems to be faster?
Владимир Смирнов's user avatar
1 vote
1 answer
185 views

Random Internal Server Error

We are receiving random internal server errors on one of our website. These internal server errors can sometimes appear only on some users but other users are not receiving it (at the very same time) ...
jpneey's user avatar
  • 113
1 vote
2 answers
1k views

How to prevent users from executing cgi scripts directly?

Apache server. There is a python script in http/cgi-bin which is used to display some content on a page. But a user can then do \<website>/cgi-bin/<script_name> to access it directly, ...
Carla is my name's user avatar
1 vote
0 answers
113 views

`baseurl` when hosting fossil as CGI

I'm self-hosting a repository on https://example.com/, running Apache. I've created a CGI script named index.cgi under DOCUMENT_ROOT as described in https://www.fossil-scm.org/fossil/doc/trunk/www/...
Yakov Galka's user avatar
0 votes
1 answer
1k views

CGI binary does not execute, instead gets downloaded

I have an apache 2.4.46-3 server, which serves out of /srv/http. I have a folder /srv/http/bin with 2 files: .htacces (mode 644): AddHandler cgi-script .exe Options +ExecCGI main.exe (mode 755): ...
AnnoyinC's user avatar
  • 103
0 votes
1 answer
980 views

How to Enable Immediate CGI Line Outputs With Nginx, Without Waiting for a CGI Script to Finish?

I have a perl and shell script that process a bunch of data and output results as they happen, like: 5 processed in 0.58 seconds. 10 processed in 0.79 seconds. ... 150 processed in 0.65 seconds. DONE! ...
Crash Override's user avatar
0 votes
1 answer
481 views

Webmin shows plain Perl script when try to open login page

when I try to open webmin login page "https://192.168.1.13:10000" it shows plain Perl script like below, what is problem? I'm running Ubuntu 18.04 and latest version of webmin. #!/usr/bin/perl # # ...
marcelo12's user avatar
1 vote
0 answers
4k views

nginx site shows blank page. No errors

Background I'm trying to get an nginx /php-fpm7 site up and running on an alpine linux server. Problem No errors appear when i navigate to it. Cert is good. And the in the /var/log/access.log ...
dot's user avatar
  • 207
1 vote
1 answer
910 views

SELinux, Nginx and fcgiWrap: how to allow access to fcgiWrap socket?

I am under Fedora 31 (linux kernel 5.4.13, Nginx 1.16.1, fcgiwrap 1.1.0) running with SELinux in enforcing mode (policy: targeted 3.14.4-44.fc31). My box hosts a server driven by Nginx. Part of it ...
ajlittoz's user avatar
  • 111
0 votes
0 answers
2k views

Python CGI script not displaying on the website at all. Apache 2 Debian 10

me and my friend have started up a server on Debian 10 and its running Apache2. I have written a very simple website and a python script just to test the cgi scripts. So basicly after a user completes ...
GawronDev's user avatar
0 votes
2 answers
456 views

How to implement multiple sites using same code on a single apache server?

I have a mod_cgi code "site.py" which is used to serve a website. I'm running several instances of this website on a single apache server, each instance has its own config file. Currently my apache ...
mgb's user avatar
  • 56
0 votes
1 answer
749 views

How's hacker used cgi script on Apache2 server to hack and delete database

Today one of my server has been hacked and hacker deleted my app database. And to restore back they are asking to pay money in BTC. Well, I started investigating to Apache2 logs and found many ...
Vin.AI's user avatar
  • 103
1 vote
1 answer
1k views

Loading css from cgit on nginx in a subdirectory

before I start I should note that I have absolutely no experience with nginx or networking, so what I have done was thanks to searching and trying different solutions. I have a problem I struggle ...
lyna's user avatar
  • 11
5 votes
2 answers
17k views

What is the difference between a proxy server and a gateway server?

From Proxy server on Wikipedia: A proxy server may reside on the user's local computer, or at any point between the user's computer and destination servers on the Internet. A proxy server that passes ...
Tim's user avatar
  • 1,517
0 votes
0 answers
265 views

Apache misconfiguration - config works on apache 2.2 but not 2.4

I have a set of cgi scripts which run on a RHEL 6.x (with Apache 2.2) box fine. There is a cgi-bin directory containing the scripts, plus an index.html (pure html) which serves as a front end to the ...
user546438's user avatar
0 votes
1 answer
798 views

Enable a single CGI script for Apache within the document root?

Is it possible to enable a single CGI script stored within the Apache 2.4 document root ? I was hoping something like the following might be possible : <VirtualHost *:80> DocumentRoot "...
Carel's user avatar
  • 109
0 votes
1 answer
752 views

Pin point 500 Error which seems to orginating from FastCGI Module

I have a php application which I have been hosting on IIS that has suddenly stopped working and returns a server 500 error. In an attempt to troubleshoot it I have added a Failed Request Tracing Rule ...
Niana 's user avatar
  • 101
1 vote
1 answer
312 views

Trace httpd when using cgi

I have configured httpd (apache2.4.6) cgi to run /bin/bash scripts. I would like to trace httpd calls of /bin/bash and see the actual command that is run. So far I have tried to use strace -p but for ...
Yon's user avatar
  • 13
0 votes
1 answer
525 views

Protecting access to CGI programs via reverse proxy

I am still a noob and autodidact in the network field, so please forgive me if what I am going to ask is just wrong. I have a web application based on JavaScript and PHP and served from my Apache web ...
umbe1987's user avatar
  • 111
3 votes
2 answers
163 views

Force all Perl scripts to run with `use strict`

I just went through a large legacy Perl web application (built using cgi-lib.pl and running as CGI with Apache HTTPD) and updated every script to use strict;, fixing a lot of small bugs along the way. ...
yakatz's user avatar
  • 1,243
1 vote
0 answers
2k views

Apache 2.4.29: cgi scripts load as text, even though cgi is enabled and .conf set up

I spent a few days searching for answers on serverfault and elsewhere, and tried them all to no avail. I'm trying to serve dynamic content using perl cgi scripts (Apache 2.4.29 on Ubuntu 18.04.2). The ...
James Gawley's user avatar
1 vote
1 answer
204 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.
Tim's user avatar
  • 1,517
0 votes
0 answers
469 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 ...
Evan Carroll's user avatar
  • 2,432
0 votes
0 answers
996 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. ...
Nick Wiltshire's user avatar
0 votes
1 answer
783 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 ...
Lucas Guerreiro's user avatar
0 votes
0 answers
775 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/...
abalter's user avatar
  • 121
1 vote
1 answer
4k 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 ...
gmini's user avatar
  • 21
1 vote
1 answer
304 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 ...
Diadems's user avatar
  • 26
0 votes
0 answers
149 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 ...
Dženan's user avatar
  • 101
0 votes
1 answer
519 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 ...
Alexound's user avatar
0 votes
1 answer
2k 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$...
abalter's user avatar
  • 121
-1 votes
2 answers
2k 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 ...
Simus's user avatar
  • 103
5 votes
1 answer
2k 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 ...
Peter Green's user avatar
  • 4,296
-3 votes
1 answer
78 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 ...
Elise Crane's user avatar
1 vote
0 answers
318 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 ...
belyid's user avatar
  • 341
0 votes
2 answers
141 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:\...
Matt Haughton's user avatar
0 votes
1 answer
2k 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: ...
Prakarsh Upmanyu's user avatar

1
2 3 4 5 6