Cgi is the common gateway interface, used for interactive webpages.
Questions tagged [cgi]
279 questions
0
votes
2 answers
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";
print "Hello, World.";
and called it first.pl. I've also…

John
- 103
- 2
0
votes
0 answers
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 downloaded in browser instead of being run by CGI…

jackhab
- 771
- 1
- 8
- 21
0
votes
1 answer
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 script. This script has to take the output of the…

marco
- 1
- 1
0
votes
0 answers
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 activity timeout error, and I did the same for this, but…

Ankit Tiwari
- 101
- 1
0
votes
3 answers
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 to echo an entire HTML doc Apache just complains…

QF0
- 183
- 1
- 7
0
votes
0 answers
When is a new PHP-CGI process created?
My production server has been having a OOM issue. Upon investigating I find that a major memory eater is PHP-CGI processes. Each of my website, be it Joomla or Wordpress, is having 3 - 6 PHP-CGI processes and each of the processes is taking around…

shenkwen
- 199
- 2
- 14
0
votes
2 answers
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 /var/www/fnu:
#!/usr/bin/perl
print…

SKaye
- 1
- 1
0
votes
1 answer
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 directory from running CGI for Python…

Noah Broyles
- 179
- 6
0
votes
2 answers
Configuration issue adding AWStat to Apache v2.2
I'm trying to add AWStats to my working Apache website. But when I go to my perl script it fails:
http://localhost/awstats/awstats.pl?config=my.domain.here
I get this error 500 in the browser:
Internal Server Error
The server encountered an…

WilliamKF
- 215
- 1
- 7
- 12
0
votes
2 answers
2010 cgi script failure
I hope you can help, I'm just a beginner! I have listed a few extra details which may not be relevant.
I upload cgi scripts onto local/personal directory on a Apache/2.2.10 server, using FTP95Pro in ASCII.
The scripts execute correctly using perl on…
Barry F
0
votes
1 answer
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/etc/apache24/httpd.conf I've uncommented the…

stckvrw
- 121
- 5
0
votes
1 answer
SCGI vs FastCGI - Which one is faster?
I want to use one of servers - libscgi and libfcgi - with dynamic content. Which one seems to be faster?

Владимир Смирнов
- 13
- 2
0
votes
2 answers
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 \/cgi-bin/ to access it directly, which is a bit ugly. Is it possible to prevent this? The same…

Carla is my name
- 109
0
votes
1 answer
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): compiled from main.cpp:
#include
using…

AnnoyinC
- 103
- 1
- 4
0
votes
1 answer
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!
etc.
However, when I visit the URL with Chrome,…

Crash Override
- 601
- 1
- 10
- 21