problem getting perl working with apache2 cgi script
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Does awstats directory reside in /usr/lib/cgi-bin? Are the directories set to executable?
You better shouldn't have installed mod_perl. It is more complicated to work with mod_perl all in all and you don't need it to run CGI scripts.
You could run
apachectl configtest
to see if it spits out warnings in respect of the configuration.
I tried setting usr usr/lib and /usr/lib/cgi-bin to executable, I do it through nautalis on ubuntu and make the checkbox dark plus a check mark.
yes awstats.pl is in /usr/lib/cgi-bin also a file called test.pl which is not executing.
I tried apachectl command but it is not found on my debian vps. I have tried entering /usr/local/apache2/bin directory to execute it there but it is still not found. I will keep looking for it
should I uninstall mod_perl?
will it revert to perl if it was already installed?
you don't need to uninstall mod_perl but I think you better comment out the
LoadModule mod_perl line in the conf and restart the server.
If you load mod_perl then you have to configure apache according to mod_perl2 rules, name a PerlHandler PerlRun or similar. But mod_perl for apache1 and 2 are different and one has to read a while to get that started.
So if awstats is the only thing to work with perl you are better off using CGI.
apachectl is probably /usr/sbin/apache2ctl
at least you could give that a try,
good luck
well I commented out addhandler and addtype (.pl) line in httpd.conf
and created 000-default.conf
I notice this file is included at the end of httpd.conf.
I restarted apache and still the same problem
I am also using this code now
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
The ".../sites-enabled/default000" is a default config file that is included by apache2.conf in some distributions.
How did you install apache2? If you are using a debian based system you can simply type
sudo apt-get install apache2
and get a working http server with a configured cgi-bin...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.