Hi,
I'm trying to work out how to disable mod_perl for JUST SOME files/a folder.
I have used the following to disable mod_perl on other servers:
<Directory /srv/www/foo.pro/www/cgi-bin/trust/admin>
SetHandler cgi-script
AddHandler cgi-script .cgi
</Directory>
<FilesMatch "(user)\.(cgi)$">
SetHandler cgi-script
AddHandler cgi-script .cgi
</FilesMatch>
Here is the full host entry in Apache:
<Virtualhost *:8181>
LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
ServerName foo
DocumentRoot /srv/www/foo.pro/www
ErrorLog /srv/www/foo.pro/logs/error.log
PerlRequire /srv/www/foo.pro/startup.pl
PerlModule Apache2::Reload
PerlInitHandler Apache2::Reload
PerlModule Apache2::RequestRec
<Directory "/srv/www/foo.pro/www">
Options MultiViews FollowSymLinks
AllowOverride all
Require all granted
</Directory>
ScriptAlias /cgi-bin /srv/www/foo.pro/www/cgi-bin
<Location /cgi-bin>
SetHandler perl-script
AddHandler perl-script .cgi
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
AllowOverride All
Require all granted
</Location>
<Location />
LimitRequestBody 5242880
</Location>
<Directory /srv/www/foo.pro/www/cgi-bin/trust/admin>
SetHandler cgi-script
AddHandler cgi-script .cgi
</Directory>
<FilesMatch "(user)\.(cgi)$">
SetHandler cgi-script
AddHandler cgi-script .cgi
</FilesMatch>
</VirtualHost>
My software is:
Server version: Apache/2.4.25 (Ubuntu)
Server built: 2016-12-21T09:13:44
mod_perl: 2.000010
I don't understand why it still insists on running all the scripts under mod_perl (I need to disable the admin one, otherwise we get some caching... and user.cgi I need to disable, as it seems like mod_perl breaks sendmail!)
Thanks in advance
Andy
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.