Cgi is the common gateway interface, used for interactive webpages.
20
votes
1answer
2k 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
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 ...
5
votes
3answers
1k 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
188 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
246 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 ...
3
votes
3answers
87 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
7k 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
246 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
2answers
413 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
1answer
336 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
1k 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 ...
2
votes
3answers
75 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
3answers
3k 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 ...
2
votes
3answers
727 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 ...
2
votes
4answers
946 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
76 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
135 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
2answers
309 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 ...
2
votes
2answers
89 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
262 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
399 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
165 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
95 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
321 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
482 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
138 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
569 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
294 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
664 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
427 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
264 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
658 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
3answers
120 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 ...
1
vote
5answers
4k 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
1answer
315 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
1answer
1k 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
3answers
1k 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.
...
1
vote
2answers
196 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
2answers
210 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
438 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 ...
1
vote
1answer
401 views
Centos 6.3 PERL CGI selinux file read access
I have a CGI script called index.cgi
It is trying to read a log file called 10.128.0.242.2012.sep.20.downloaded.txt under the path /var/log/trafcount/
It appears that it is being blocked by selinux. ...
1
vote
2answers
95 views
Scaling Python CGI scripts [closed]
I have Apache running on a quad-core Ubuntu server on a 384kbps ADSL. Files are uploaded by users via a web-form and processed by various Python programs running as CGI scripts. Some scripts are CPU ...
1
vote
2answers
306 views
How to get rid of TCP or lighttpd 4KB buffering on CGI output?
I have a stock lighttpd install on a Amazon Linux AMI running on EC2. The only config changes I did is to enable CGI support.
Then there is a custom CGI tool (written in C) put in /cgi-bin/ that is ...
1
vote
2answers
116 views
Apache CGI Script Can Cannot Overwrite a File in a Directory it has full permissions to
Having a weird problem on a Solaris 10 box. I have a cgi script (perl) which needs to overwrite a file. We do not have suexec running on Apache so the destination directory has full (777) access so ...
1
vote
1answer
294 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?
1
vote
1answer
170 views
Make Nagios graphs public
I have a Nagios instance running on Ubuntu Server Lucid as a VM monitoring our Windows network.
I would like to have some specific graphs made by the trends.cgi file available on the internal ...
1
vote
1answer
406 views
Install PHP both as CGI and CLI
I'm trying to set up development environment for some old projects in PHP 5.1.4. It needs to run as CGI (or fastcgi) under apache and I would like to have cli binary. My configure options are:
...
1
vote
4answers
5k 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
2answers
1k 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 ...
1
vote
1answer
45 views
Mod Rewrite for cgi-bin
So i want to rewrite the following url structure
mysite.com/cgi-bin/shop/shop.cgi/
to
mysite.com/+
I have this as a rule and it works, but it doesn't force the url to print in the ...