Allow per-vhost CGI?

Daniel Fenton
11 December 2018, 19:49
I have two vhosts,

one of them needs CGI since it's my main website;

the other one (much more niche and internal) needs a small interpreter script to parse a few files to display them properly to the end-user (on Apache, this is handled through nothing but an Action line in .htaccess; Hiawatha requires the interpreter to be set up as a full-blown CGIHandler).

I would like not to have PHP running on this secondary vhost (in fact, I would, very much, like it to treat PHP files as completely unspecial, if that's possible!), but I do still need some files on it handled by a custom interpreter script.

Can I enable or disable individual CGIHandlers on a per-vhost basis?
Hugo Leisink
15 December 2018, 17:34
No. But the solution is simple: don't include PHP scripts in that website. What ain't present, can't be executed.
16 December 2018, 22:02
i don't get your answer Hugo
Hugo Leisink
18 December 2018, 17:43
CGI (PHP is also a CGI) is configured globally. You can't configure how CGI works per virtual host. You can only enable the CGI execution per host.
18 December 2018, 19:12
uhm, yes, i may be dense but ... isn't that exactly what Hiawatha permits to do ? Something like ...

Run a secondary instance of Hiawatha on a non standard port which does address the (sandboxed) PHP CGIHandler running.
On the primary instance configure part of the URL space to rewrite to the secondary instance of Hiawatha for the part of the URL space requiring the minute PHP scripts.

And/or writing a befitting URLToolkit.
This topic has been closed.