Questions tagged [cgi]

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

274 questions
80
votes
6 answers

How to test if my server is vulnerable to the ShellShock bug?

How can I ensure my Bash installation is not vulnerable to the ShellShock bug anymore after the updates?
Giovanni Tirloni
  • 5,693
  • 3
  • 24
  • 49
23
votes
1 answer

Python CGI on Amazon AWS EC2 micro-instance -- a how-to!

How can you make an EC2 micro instance serve CGI scripts from lighthttpd? For instance Python CGI? Well, it took half a day, but I have gotten Python cgi running on a free Amazon AWS EC2 micro-instance, using the lighttpd server. I think it will…
user595585
15
votes
3 answers

How to pass $_GET variables to a PHP script via the command line?

I am trying to create a webserver that serves PHP scripts. Currently, it works as follows: The client requests /index.php?test=value The server invokes php index.php The server feeds the HTTP request headers as STDIN to the PHP process The server…
Nathan Osman
  • 2,705
  • 7
  • 31
  • 46
8
votes
4 answers

Apache: Permission denied: exec of '/var/www/html/cgi-test/first.pl' failed

So, I'm new to CGI / Perl, I'm trying to move a perl-based web app to a new server. My new server is CentOS 7, which runs Apache HTTPD 2.4.6. I'm trying to get a basic Perl CGI working from an HTTP request. The web request is returning "500 Internal…
oggotron
  • 155
  • 2
  • 2
  • 3
8
votes
4 answers

What Apache/PHP configurations do you know and how good are they?

I wanted to ask you about PHP/Apache configuration methods you know, their pros and cons. I will start myself: ---------------- PHP as Apache module---------------- Pros: good speed since you don't need to start exe every time especially in…
Vladislav Rastrusny
  • 2,581
  • 12
  • 39
  • 56
8
votes
2 answers

Set Apache HTTP header except for specified URL

I'm using Apache 2.2 and want to set the X-Frame-Options header to "deny" across most of the site. I can turn it on unconditionally using mod_headers. However, there is one CGI scripts that returns content that has to be framed, so I need to turn…
user9876
  • 187
  • 1
  • 1
  • 8
7
votes
1 answer

How to debug CGI over fcgiwrap/nginx

I serve executable scripts (mainly in C) through fcgiwrap connected with nginx. Since the scripts are complied, I can get the coding errors during compilation, but sometimes I receive CGI errors simply stating An error occurred while reading CGI…
Googlebot
  • 1,007
  • 2
  • 15
  • 29
6
votes
3 answers

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 directory with no luck. I tried to place CGI scripts into…
Joseph
  • 183
  • 1
  • 1
  • 10
6
votes
2 answers

Options ExecCGI is off in this directory: /var/www/index.py

I have looked at alot of posts with a similar question but none seem to work for me i have the following /etc/apache2/httpd.conf file: Options +ExecCGI Options +ExecCGI AllowOverride…
Joshi
  • 71
  • 1
  • 1
  • 4
6
votes
1 answer

nginx + fcgiwrap: how come order of fastcgi_param matters?

I'm running Debian 6.0.3 (squeeze), nginx-0.7.67, fcgiwrap-1.0-1+squeeze1. Here is the test script: #!/usr/bin/perl use 5.010; use warnings; use strict; use Data::Dumper; print "Content-Type: text/html\n\n"; say Dumper {map {$_ => $ENV{$_}}…
x-yuri
  • 1,845
  • 1
  • 22
  • 27
6
votes
3 answers

PHP as CGI or Apache Module?

I've always believed that PHP works better installed as an Apache module, but recently, someone on a local forum pointed out that running PHP as CGI is better security-wise. I've done some googling and it appears that Dreamhost defaults its PHP…
Ionuț G. Stan
  • 385
  • 1
  • 4
  • 12
6
votes
3 answers

bad interpreter: Text file busy

For ages I've gotten used to editing Perl CGI scripts in "vi" and simultaneously having a browser open to test them. Lately, I've been getting "500" server errors when I do that, and when I run the script from the shell, I get "bad interpreter:…
JoelFan
  • 2,165
  • 5
  • 24
  • 30
6
votes
2 answers

How to return 404 from Apache2 CGI program

I'm using mod_rewrite to redirect all incoming requests to a CGI application. I now need to have the application return a 404 if the requested file isn't found. How can I go about this from my program? The first line sent is the content-type…
user11888
  • 89
  • 2
  • 5
5
votes
1 answer

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 or produces a lot of output. In particular when…
Peter Green
  • 4,056
  • 10
  • 29
5
votes
3 answers

Finding the current user authenticated by basic auth (Apache)

When you log in through a basic auth page, is the username you authenticated as stored anywhere (on the server or client machine), maybe in an environment variable? Background: I have a common web administration page for an e-mail server and I'd…
RHELAdmin
  • 360
  • 3
  • 10
1
2 3
18 19