Re: Problem running CGI Script
Garima Kishore wrote: Hi, Assuming I have configured Apache server for running CGI scripts on the Linux platform , I get an error when I type the URL http://MYMACHINENO:8080/cgi-bin/.PLX PROGRAM on the browser ERROR:The requested item could not be loaded by the proxy.Operation timed out. This type of error occurs when the program goes into a loop or hangs and the browser is left waiting until it gets fed up and times out. Your URL looks very strange... Is your program really called .PLX? What is the word PROGRAM doing on its own in the URL - is it meant to be an argument? Please check a few things: - Does your program run properly from the command line? - If you want to send arguments, use the correct CGI syntax, e.g. http://mymachine:8080/cgi-bin/my_prog?arg1=bananaarg2=kiwi i.e. - the argument list is joined to the program name with a ? - arguments and values are joined with a = - extra argument/value pairs are joined with a Best regards, Owen Boyle.
Re: Regarding the PerlAuthenHandler
qazi Ahmed wrote: Syntax error on line 547 of /export/home/ats/test-tools/ats/guts/apache/conf/httpd.conf: Invalid command 'PerlRequire', perhaps mis-spelled or defined by a module not included in the server configuration Are you *really* sure you have installed mod_perl? Try ./httpd -l to list the modules and check.. Rgds, Owen Boyle.
Re: Prob with configuring CGI.
Vikram Hari Deshmukh wrote: Well I have started with CGI, 2 days back. But some aspects makes me confused. I am having Apache server over Redhat linux 6.2. I'm a bit confused too... You mention CGI but you posted to a mod_perl list. Are you using mod_perl? To run plain old CGI programs (using an external perl interpreter), all you need is: Directory /home/httpd/cgi-bin Allow from all /Directory Options +ExecCGI ScriptAlias /cgi /home/httpd/cgi-bin call it with http://my_domain/cgi/my_prog To run CGIs under mod_perl (using the mod_perl interpreter), with one-shot persistence (i.e. script executes then exits) use Apache::PerlRun; Directory /home/httpd/perl-run Allow from all /Directory Alias /perl-run/ /home/httpd/perl-run/ Location /perl-run SetHandler perl-script PerlHandler Apache::PerlRun Options +ExecCGI /Location call it with http://my_domain/perl-run/my_prog To run CGIs under mod_perl but with persistence (i.e. the interpreter stays loaded and global variables remain set) use Apache::Registry; Directory /home/httpd/perl Allow from all /Directory Alias /perl/ /home/httpd/perl/ Location /perl SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI /Location call it with http://my_domain/perl/my_prog You can also write your own handlers in mod_perl but that's quite a way from CGI - I don't think that's what you're trying to do... Rgds, Owen Boyle.
Re: [OT] ApacheCon BOF
Nick Tonkin wrote: Personally I find the very name Apache a little uncomfortable.. ... but the relevance of an http server to the Apache nation escapes me (and the symbolizing of the Apache nation with a feather strikes me as stereotypical at best). Most of you will have seen, at least in photgraphs, the remarkable sandstone escarpment of Ayer's Rock in Australia. For millenia this was a sacred place for the aboriginal Australians. When europeans first started touring the continent, they happily scampered up it since to them, climbing to the top of things seems to be the obvious thing to do. After about a century of this, it finally occurred to someone to ask an aboriginal what he thought about people climbing the rock - did he mind? The answer was "Yes, actually". Nowadays, although Yulura (to give it its original name) is still climbed (the native austalians choose not to assert their opinions) you should be aware that you climb it with the disapproval of a people to whom it is holy. You might as well whack a few pitons into the Wailing Wall or bungee-jump in St. Peter's Basilica. The point I am making is that you cannot anticipate how people of a different culture might think about symbols and names and places. It may be that people of the Apache Nation are indifferent to the name being used for a computer program, or they may like the association with a freedom-loving, open-source, not-for-profit organisation which is striving against corporate greed to make the world a better place, or they may find it offensive. I don't know. Did anybody ask them? Rgds, Owen Boyle.
Re: please help with perl script
Keletso Mokgethi wrote: i am a novice trying to run a perl script on apache i created a directory under httpd called "perl" in which i stored the script. according to redhat's linux 6.2 apache/ssl documentation, mod_perl is ready to run once the server is launced and there is no need for any changes in httpd.conf Hold it right there! If you created a directory, you had better tell apache about it - for that you *need* to edit httpd.conf... let's proceed. hoping to run the script i entered the URL: http://localhost/perl/Read_dat.perl/ and got the reponse: Forbidden "you don't have permission to access /perl/Read_dat.perl/ on this server. There are a few reasons why you might get this... In short, apache has to be able to find the program and access to the directory has to be "allowed". Before doing anything else, look in httpd.conf until you find the ErrorLog directive, then find the file it is pointing to and tail that file while you run your prog to see what errors you are getting ($ tail -f /home/apache/logs/error_log) Back to the problem: I think you are trying to run your script using the Apache::Registry. To do this: - let's assume your ServerRoot is "/home/apache" - check mod-perl is compiled into apache ($ /home/apache/bin/httpd -l and look for mod_perl) - put your script in /home/apache/perl (already done) - check it is executable ($ chmod +x Read_dat.perl) - its first output has to be the script-header (print "Content-type: text/html\n\n"; - NB note the two "\n"). - in httpd.conf, you need the following Directory /home/apache/perl # this "allows" apache into the directory Allow from all /Directory Alias /perl/ /home/apache/perl/ # this lets it find the script Location /perl # this tells it what to do SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI /Location - restart apache - hit the URL; http://localhost/perl/Read_dat.perl By the way, in case you don't actually have mod_perl, bear in mind that you don't need to use mod_perl to get apache to execute a perl program. You can just use plain old-fashioned CGI. A simple configuration that might get you running quicker is: - create a directory /home/apache/cgi and put Read_dat.perl into it - make sure it is executable - its first output has to be the script-header (print "Content-type: text/html\n\n"; - NB note the two "\n"). - in httpd.conf: Directory /home/apache/cgi Allow from all /Directory DocumentRoot /home/apache/html ScriptAlias /cgi /home/apache/cgi - restart apache - hit the URL; http://localhost/cgi/Read_dat.perl Now you should get some output. Check the error_log to see if anything goes wrong (this will log apache-level errors). If you need to debug your program, switch on script-logging: ScriptLog logs/script_log and this will log STDERR from the script. best regards, Owen Boyle.
Apache::ASP - Forbidden
Francisco Ramiro Pereira wrote: Greetings When I run http://localhost/eg I got this: ?Forbidden You don't have permission to access /eg/ on this server. Apache/1.3.14 Server at royal.sisnetti.com.br Port 80? When I run http://localhost/asp/sample it works well. What I'm doing wrong. What does your DocumentRoot point to? The URL http://localhost/ will lead to whatever directory is defined by DocumentRoot. So you should have: DocumentRoot /home/httpd/html then: http://localhost/ --- /home/httpd/html http://localhost/eg --- /home/httpd/html/eg etc... Remember to put an index.html file in each directory (or define DirectoryIndex, or set Options +Indexes)... Also, check you do not have a Deny directive blocking access somewhere.. A sensible configuration would be: # Deny access everywhere and then allow it only where needed Directory / Deny from All /Directory Directory /home/httpd/html Allow from all /Directory Rgds, Owen Boyle PS To check, look in the error_log when you get the Forbidden error - you'll probably see something like: "/home/httpd/html/eg/eg does not exist"
Re: List your software with new feature-based search engine
Dear BigSofte, You must have read my mind! I do *indeed* have a software product which I would love to have your help in marketing!!! It is called ListGuard-2.0 and is an intelligent agent which uses heuristic pattern matching to detect spam mails and advertising and purge them from mailing lists and other public forums. I hope to sell it to the maintainers of public mailing lists so they can keep their lists free of unsolicited junk mails. Could you help me sell it? Rgds, Owen Boyle.
Re: Forbidden access
Paul Cotter wrote: Also there's a typo: It has been confirmed by the original author that the typo was only in the email sample. There was also a /Locatiom but I guess this was a transcription error also. As a general rule, when posting slices of config, code etc. to the lists: ALWAYS use your window-manager's cut'n'paste utility to grab the code. NEVER transcribe it by typing it in again... If you try to type it in, you will only type in what you THINK it says - not what it actually says, i.e. you might unconciously correct an error in the code or introduce a new error which becomes red-herring. Rgds, Owen Boyle.