Perl-Sensitive Sunglasses | |
PerlMonks |
Re^3: Apache ignores ARGV[0] requestby digiryde (Pilgrim) |
on Feb 08, 2005 at 14:46 UTC ( [id://429069]=note: print w/replies, xml ) | Need Help?? |
Most do run Apache, but most do not run mod_perl. This has to do with security issues on shared machines. As far as cgi not working with Apache, that is probably a settings issue. First, mod_cgi has to be enabled in Apache, and secondly, the directory that your script is in has to be configured within apache (through a .conf file or a .htaccess file) to allow the execution of scripts. These are not the only potential issues, permissions being another, but these are the ones most people have issues with the most. Is the configuration of your local machine set up to run the perl script as a cgi script? I would be willing to bet that the directory you have your script in is not set up to run cgi. Something like this in a .htaccess file in the directory you want the script to run as a cgi:
and then, in the httpd.conf somewhere, put You can use an index.pl script to log efforts to directly access the cgi-bin directory, create your own error page, or whatever. I use this to monitor for attempted cracks into the system. It has actually worked well in stopping some. Returning their IP address after a few tries on a page that says illegal access attempt logged scares most kiddies off. You can also do without it. The fewer things a stranger has access to, the safer you are. I would develop the code in as much the same environment as what I was going to place it in, so if the host uses cgi-bin, I would use cgi-bin. This helps down the road by eliminating potential issues with differences in environments, like using mod_perl to develop in, but then using cgi to run in production. Bad combination. I would also try to keep my scripts in a directory that is not in the public_html path. Most hosts I work with allow that and it is much more secure. Good luck to you.digiryde
In Section
Seekers of Perl Wisdom
|
|