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

learn more… | top users | synonyms

68
votes
6answers
48k views

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?
21
votes
1answer
3k views

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 ...
6
votes
3answers
9k views

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 ...
6
votes
4answers
2k views

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 ...
6
votes
2answers
9k views

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: <Directory /var/www/index.py> Options +ExecCGI ...
5
votes
3answers
2k views

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 ...
5
votes
1answer
362 views

Apache not calling the Smart HTTP CGI

I'm setting up a git server with git-http-backend and Smart HTTP but Apache doesn't seem to be calling the Smart HTTP CGI: $ curl ...
4
votes
3answers
428 views

Generate TFTP Content on the fly?

I know this isn't the purpose of TFTP, but I'm working in an environment where a lot of different types of devices pull provisioning info from a TFTP server. What I'm developing is a provisioning ...
4
votes
2answers
875 views

Windows Apache 2.2 painfully slow executing CGI

I've recently set up Apache 2.2 and git on one of our Windows XP PCs for gitweb access using the setup at https://git.wiki.kernel.org/index.php/MSysGit:GitWeb As noted on the wiki, the only version of ...
3
votes
3answers
2k views

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

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 ...
3
votes
3answers
912 views

What's the safest way to kick off a root-level process via cgi on an Apache server?

The problem: I have a script that runs periodically via a cron job as root, but I want to give people a way to kick it off asynchronously too, via a webpage. (The script will be written to ensure it ...
3
votes
2answers
3k views

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 ...
3
votes
4answers
3k views

How to add a pool to FPM (nginx) without reload/restart fpm itself?

Im building an environment (on a ubuntu 10.04.02 machine) to handle a website with many (should support at least 1000) subdomains, each of them served by a different FPM pool, with a different user. ...
3
votes
3answers
99 views

Are there benefits in using CGI in a large scale Apache2 server or should I just use FASTCGI?

I have a web product done in PHP that theoretically should support a lot of users. Problem is, I just left the apache as it is and found out its just running as CGI. Is this very wrong and I should do ...
3
votes
2answers
486 views

PHP as a CGI binary vs. PHP as an Apache module

What are the benefits of running PHP as a CGI binary compared to running PHP as an Apache module? Are there: Security benefits? Stability benefits? Performance benefits? I've always installed and ...
3
votes
2answers
15k views

Apache 2.2 CGI timeout configuration

I have a default Apache 2.2 system setup with a Perl CGI script directory configured like so: ScriptAlias /jarvis/ "/opt/jarvis/cgi-bin/" Nothing fancy in here except one of my scripts takes over ...
3
votes
2answers
480 views

how to spawn php-cgi automatically when it exits?

I am using php-cgi on ubuntu(with nginx), and the command to start it is: spawn-fcgi -a 127.0.0.1 -p 9100 -f /usr/bin/php-cgi -P /var/run/fastcgi-php.pid but sometimes the php-cgi process will exit ...
3
votes
1answer
371 views

Selective setuid root or running an application as root ? (web server/cgi context)

Well we have an in house server manager (like Webmin, only more specific), comprising of a bunch of C CGI programs and CGI Perl scripts, some of which require root privileges (adding system users, ...
2
votes
3answers
86 views

Setting the server to look for index.php file by default

I am a web developer and I've requested our Sys-Admin to setup a server for my team that will be used as a development environment. The PHP is running as a CGI. When i try to open http://myaddress/ I ...
2
votes
4answers
1k views

Perl CGI.pm module wildly out-of-date on RedHat/CentOS 5

I am trying to install all my Perl modules from RPM (using rpmforge.net), instead of just acquiring them from CPAN. My ultimate goal is to get Bugzilla 3.4.4 running. It requires CGI.pm 3.21 or ...
2
votes
2answers
502 views

How to execute (some) CGI commands as root

I want to put a simple CGI script in my APACHE server. I'd like to write it possibly in C (but also in PERL, if I want). The problem is that it must contain some lines that can be executed only by ...
2
votes
2answers
140 views

Is there another way to run Apache2 securely for end users without using CGI mode?

Is there another way to run Apache2 securely for multiple end users (like hosting hundreds of blogs) without using CGI mode as required by suPHP? It just seems so inefficient to use CGI mode for PHP ...
2
votes
1answer
76 views

How do I prevent Apache2 from trying to execute a file as a script?

So basically, I followed this guide about iptraf monitoring and rrdtool to the letter. I put it in /usr/lib/cgi-bin/ as usual for cgi scripts. Then, when I visit it from a browser, the images it makes ...
2
votes
2answers
4k views

How do I properly disable cgi scripts e.g. guestbook.cgi on WHM [closed]

After a PCI scan identified guestbook.cgi as a risk, I want to disable the cgi-scripts installed by WHM (v11, running on CentOS5). I would like to do this "properly" using the WHM Web interface if ...
2
votes
2answers
121 views

Regular web CGI scalability on modern hardware?

I am engaged with a project to upgrade a time-tracking system that's been basically unchanged for 10 years. It runs Linux/Apache/CGI/MySQL3 on an HP Proliant Pentium some-or-the-other, with a ...
2
votes
1answer
219 views

CGI permissions with NGINX & FastCGI

I'm running GitWeb (which is essentially a CGI script) on a server which also runs GitLab. My aim is to provide reaad-only access to GitLab repositories without registering people. I've pointed ...
2
votes
1answer
621 views

How to get input content from GET or POST request in CGI program (via apache)?

I'm studying making a CGI program. Now I can print text what I want. But how can I get GET or POST input from CGI program? (such as query-string or post-body)
2
votes
1answer
679 views

Apache mod_perl vs. mod_cgi: How do I decide which to use?

What factors should I consider when deciding whether to use Apache's mod_perl or mod_cgi, when configuring an existing web application?
2
votes
1answer
466 views

.htaccess 'RewriteEngine on' Breaks CGI Application

My .htaccess file is in the root directory of my website, and I narrowed down a problem to the single line of code 'RewriteEngine on'. How do I know it's this piece of code? Because I deleted the ...
2
votes
1answer
271 views

Lighttpd send Nagios command-line output instead of web interface

I recently installed Nagios on an EC2 instance running AmazonLinux (which is basically SuSe, to my understanding). I'm using lighttpd and mod_cgi to serve the web interface. When I navigate to a ...
2
votes
1answer
254 views

Suexec, group-writeable files

I am running an Apache server with Suexec. However, I get an internal server error if I try to execute a CGI script that is group-writeable (if I chmod g-w , the script runs fine) However, I want the ...
2
votes
1answer
586 views

Unable to SSI include some CGI scripts

I have a page site.shtml on an Apache server in which I am trying to include a few CGI scripts, like so: <p><pre><!--#include virtual="files/testfile" --></pre></p> ...
2
votes
1answer
682 views

Changing server API from CGI to FastCGI

I have a server set up on CentOS and I need to change the API from CGI to FCGI (Someone else set this up initially) for x-cache to work (we need this as we have a TV appearance on monday and are ...
2
votes
1answer
192 views

How to serve php requests through a single persistent php-cgi instance?

How to set up PHP Version 5.2.17 on Apache/2 to serve php requests through a single persistent php-cgi instance?
2
votes
1answer
1k views

CGI Died, error log

I've been getting some 500 internal server errors on my website every so often, so I had a look at the error log. I am using lighttpd with Kloxo (lxadmin) installed. I have xcache enabled. ...
2
votes
1answer
455 views

Error trying to get munin running as a cgi

I'm just cutting my teeth getting munin running (latest 1.4.1 on centos) . It's working but I want it as a cgi frontend so I'm not generating graphs constantly when I look at them a few times a day ...
2
votes
1answer
873 views

Running Web.py as an IIS CGI Script

I recently wrote a web.py-based stand alone web service. Due to unforeseen circumstances, the service has to run through IIS. I've heard that it's possible to run web.py as a CGI in IIS, but I'm ...
2
votes
0answers
383 views

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 ...
2
votes
0answers
685 views

Force Apache to kill its children after lost connection (“stop button” pressed)

How can I make Apache kill the CGI's that it has spawned, after the client (browser) has closed the connection? I got a couple of CGI's that perform long-running operations and send output every 15 ...
1
vote
3answers
557 views

Can advanced web servers be faster than basic web servers?

A bsic web server such as python SimpleHTTPServer or THTTPD reads static files with least process; thus is quite fast. Normally, adding more features to create an advanced web server (but still ...
1
vote
5answers
772 views

Methods of Uploading files to apache without webdav or ftp, scp, ssh, telnet or sftp?

The company where I work has a desktop application that uploads files to a site without any of the aforementioned protocols. They use CGI on the backend, so is it possible that they are uploading ...
1
vote
5answers
7k views

How to compile PHP 5.3 CGI?

php-cgi seems to have vanished in PHP 5.3.1. I've tried both the --enable-cgi and --disable-cli flags for ./configure, but it doesn't create a binary under the sapi/cgi subdirectory.
1
vote
4answers
7k views

Run CGI in IIS 7 to work with GET without Requiring POST Request

I'm trying to migrate an old CGI application from an existing Windows 2003 server (IIS 6.0) where it works just fine to a new Windows 2008 server with IIS 7.0 where we're getting the following ...
1
vote
1answer
3k views

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

RewriteRule [E=CONTENT_TYPE:foo/bar] has no effect on Apache/mod_php

I was trying to prevent PHP from parsing POST requests. It does automatically when it sees the according MIME type. For that I was considering following RewriteRule hack: RewriteCond ...
1
vote
2answers
218 views

Need to determine how php files are being rendered in a LAMP configuration (CGI, FastCGI, or mod-php)

How do I determine how our php files are being rendered in a simple LAMP configuration? phpinfo shows: -- Configure Command -- --enable-force-cgi-redirect --enable-fastcgi -- Server API -- ...
1
vote
1answer
857 views

htaccess redirect / to cgi-bin/cgiscript.cgi not working

1st of all the disclaimer: this is my very first "meeting" with .htaccess, and I'm not a sysadm, never was, but the guy in the neighborhood, who used to set up the machine. So now I have to set up ...
1
vote
2answers
258 views

HTML pages getting 'cut off' CGI/Perl

I noticed a problem with web pages getting 'cut off' with a Perl/CGI based proprietary application I administer on a server running Apache 2.2. This lead me to investigate the problem further by ...
1
vote
6answers
462 views

Using unix 'mail' command from CGI - dangerous?

I am adding a feedback form to a web page and would like to know if it is safe to simply filter the contents of the TEXTAREA element (after decoding) through the 'mail' command to send an e-mail to ...