I've set up a CGI directory using the
userdir mod in Apache. I'm using configs as general as possible to have them appliable to other users on my laptop. I got to a point where I can run the script using this URL:
But I also put a link to my
public_html in the server's root directory at
/var/www/html, so when the
localhost URL is called, I get the index with a link to my dir at
localhost/tomas. The link works fine and brings up another index, one of my user. Now, the private cgi-bin is at
/home/*/public_html/cgi-bin, so I can see the
cgi-bin when I get the private index. Now, when I enter this directory, I get another index with the CGI's. Which is fine with me, though I'm not sure if this is considered secure. But if I call a CGI from there, it doesn't execute and shows instead. This is the problem.
As far as I know, it's about Apache not viewing
I've been looking for a directive that would make it work, but can't find it. I'm not even quite sure what's at my disposal - a directive or what else?
<IfModule mod_userdir.c> UserDir public_html UserDir disabled root <Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET POST OPTIONS> Require all granted </Limit> <LimitExcept GET POST OPTIONS> Require all denied </LimitExcept> </Directory> <Directory /home/*/public_html/cgi-bin> Options ExecCGI AddHandler cgi-script .cgi </Directory> </IfModule> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet