06-17-2008
apache ErrorDocument 400 /cgi-bin/400.cgi
Hi All,
Sorry if the question is trivial for you but, I am new to Apache (2.0.63) and am trying to figure out how to display my 400.cgi. Here is what I have in httpd.conf
servername testing
DocumentRoot "/usr/local/apache2/htdocs"
ErrorDocument 400 /cgi-bin/badrequest-400.cgi
Here is how I am trying to test it. ( the actual file exist in /usr/local/apache2/cgi-bin/400.cgi)
telnet testing 80
Connected to testing
Escape character is '^]'.
HEAD / HTTP/1.1
HTTP/1.1 400 Bad Request
Date: Tue, 17 Jun 2008 03:04:06 GMT
Server: Web Server
Connection: close
Content-Type: text/html; charset=iso-8859-1
Connection to mgifap10 closed by foreign host.
This is not my 400.cgi. It is the default 400 Bad Request. Can you help me please.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Can any body help me with apache and cgi
i'dont know how iconfigure apache to use cgi...
and when i try to start apachectl it says there is no file...
please help me...i have apache installed... (1 Reply)
Discussion started by: CreamHarry
1 Replies
2. Shell Programming and Scripting
If I have a Perl CGI script (script01), which fills an array(s) with information and outputs a HTML page with a link to another CGI page (script02); is there anyway to pass the array(s) from "script01" to "script02" when the page visitor clicks the link?
Hope that makes sense!
:) (2 Replies)
Discussion started by: WIntellect
2 Replies
3. Shell Programming and Scripting
Hi,
1. How to Write csh CGI-BIN script which return a web page which show the environment of the executed script ?
2. How do we read command line on csh and ksh ?
Thank's (2 Replies)
Discussion started by: 7eleven
2 Replies
4. Linux
I'm trying to set up a nagios server.
I have no problem accessing the home page of my nagios server, but can not get into any cgi page.
I've checked the rights, and checked the .htacces file in the /usr/lib/nagios/cgi directory
I've checked all conf files for apache, but i unvariably get:... (2 Replies)
Discussion started by: penguin-friend
2 Replies
5. Shell Programming and Scripting
Hey Guys,
I need to copy some files from my Apache server to SMB share ...
copy $file,"/Volumes/v1/x/test/$datestamp$name$suffix"
Unfortunately this command when executed from Apache/cgi-bin is not able to access mounted volumes .. is there anything that can be done about that ... Can... (1 Reply)
Discussion started by: NDxiak
1 Replies
6. Web Development
Hi guys, I've been trying to figure this out all day however havent managed to as of yet.
I have a server called netmon (network monitoring) which runs a multitude of programs to monitor the network.
I also have a cname pointing to netmon called smokeping.
At the moment to access smokeping... (0 Replies)
Discussion started by: JayC89
0 Replies
7. UNIX for Dummies Questions & Answers
Hello anyone,
I'm a PHP programmer that, through work has to be a server administrator. We have a dedicated server at godaddy. I just found this forum but probably could have asked a thousand questions that I've already figured out.
I tried finding anything online and would think this would... (0 Replies)
Discussion started by: Freddythunder
0 Replies
8. Shell Programming and Scripting
Hi team,
I have a typical problem with cgi pages in apache webserver in WINDOWS
I am able to execute(display) the pages that are saved in cgi-bin folder.
But I am not able to execute the pages stored in htdocs or other folder other than cgi-bin folder.
Could anyone please let me know how... (1 Reply)
Discussion started by: scriptscript
1 Replies
9. Shell Programming and Scripting
Hi All,
I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet.
I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet.
print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies
10. UNIX for Beginners Questions & Answers
Hello,
I want to run this script on my CentOS 6 via browser :
________________________________________________________________________________________________
#!/bin/sh
echo Username?
read MY_NAME
echo Provisional file name?
read MY_FILE
echo File NAME you want to save?
read MY_FILE2... (16 Replies)
Discussion started by: juta2020
16 Replies
LEARN ABOUT DEBIAN
cgi-fcgi
cgi-fcgi(1) General Commands Manual cgi-fcgi(1)
NAME
cgi-fcgi - bridge from CGI to FastCGI
SYNOPSIS
cgi-fcgi -f cmdPath
cgi-fcgi -bind -connect connName
cgi-fcgi -start -connect connName appPath [nServers]
cgi-fcgi -connect connName appPath [nServers]
DESCRIPTION
cgi-fcgi is a CGI/1.1 program that communicates with an already-running FastCGI application in order to respond to an HTTP request. cgi-
fcgi is also capable of starting a FastCGI application.
When you invoke cgi-fcgi as
cgi-fcgi -f cmdPath
then cgi-fcgi opens the file at cmdPath and reads its arguments from that file. cgi-fcgi will skip lines that begin with the comment char-
acter #. The first non-comment line should contain valid arguments in one of the other three forms.
The -f form of cgi-fcgi is designed for Unix systems whose exec(2) family of system calls supports the execution of command interpreter
files. For instance, if a file with execute permission contains the text
#! /bin/cgi-fcgi -f
-connect /httpd/root/sock/app /httpd/root/bin/app
the effect is the same as executing
/usr/bin/cgi-fcgi -connect /httpd/root/sock/app /httpd/root/bin/app
When you invoke cgi-fcgi as
cgi-fcgi -bind -connect connName
the connName argument is either the path name of a Unix domain listening socket or a host:port pair. If connName contains a colon, it is
assumed to be host:port. cgi-fcgi performs a connect(2) using connName. If the connect succeeds, cgi-fcgi forwards the CGI environment
variables and stdin data to the FastCGI application, and forwards the stdout and stderr data from the application to cgi-fcgi's stdout
(most likely connected to a Web server). When the FastCGI application signals the end of its response, cgi-fcgi flushes its buffers and
exits, and the Web server completes the http response.
When you invoke cgi-fcgi as
cgi-fcgi -start -connect connName appPath [nServers]
then cgi-fcgi performs the function of starting one or more FastCGI application processes. The connName argument specifies either the path
name of the Unix domain listening socket that cgi-fcgi will create, or is "localhost:NNN" where NNN is the port number of the TCP/IP lis-
tening socket that cgi-fcgi will create on the local machine. (cgi-fcgi will not create processes on remote machines.) After cgi-fcgi
creates the listening socket, it forks nServers copies of a process running the executable file appPath. If nServers is omitted, the
effect is as if the value "1" had been specified. The processes share the single listening socket.
When you invoke cgi-fcgi as
cgi-fcgi -connect connName appPath [nServers]
cgi-fcgi performs -bind and then, if necssary, performs -start and repeats the -bind. That is, cgi-fcgi first operates as if the command
had been
cgi-fcgi -bind -connect connName
If the connect fails, cgi-fcgi tries
cgi-fcgi -start -connect connName appPath [nServers]
and finally retries
cgi-fcgi -bind -connect connName
In this form, cgi-fcgi does not support TCP/IP connections.
ENVIRONMENT VARIABLES
The usual CGI ones, but they are not interpreted by cgi-fcgi.
SEE ALSO
FGCI_accept(3).
(in Debian, /usr/share/doc/libfcgi?/*)
BUGS
cgi-fcgi doesn't generate useful HTTP responses in case of error, and it generates no response at all when run as start-fcgi.
On Digital UNIX 3.0 systems the implementation of Unix Domain sockets does not work when such sockets are stored on NFS file systems.
Symptom: cgi-fcgi may core dump or may exit with status 38. Work-around: store sockets in local file systems (/tmp often works) or use
TCP/IP.
On AIX systems the implementation of listening sockets does not support socket sharing, and the standard FastCGI application libraries
can't synchronize access to AIX listening sockets. Work-around: Don't use the nServers argument on AIX.
HISTORY
Copyright (c) 1996 Open Market, Inc. See the file "LICENSE.TERMS" for information on usage and redistribution of this file, and for a DIS-
CLAIMER OF ALL WARRANTIES. $Id: cgi-fcgi.1,v 1.1.1.1 1997/09/16 15:36:26 stanleyg Exp $
1997-09-17 cgi-fcgi(1)