1

Apache 2.4.29 (Fedora)
Perl v5.26.1

I have a website which is run, for several reasons, out of the public_html directory of the user "jaf". Apache is set up to run cgi scripts in this directory tree as the local user ("jaf"). So, for instance "http://billyard.ca/~jaf/cgi-bin/simpletest.cgi" successfully executes as user "jaf" (rather than the default "apache"). What I am trying to achieve, unsuccessfully so far, is the following:

  1. To get apache to run all cgi called by "http://billyard.ca/cgi-bin/" as if they were called by "http://billyard.ca/~jaf/cgi-bin/" (i.e., omit the "~jaf/") yet still operate within the "~jaf/public_html" directory as user "jaf" rather than "apache". I've added the following to the apache configuration:

    <VirtualHost *:80>
    Servername billyard.ca
    SuexecUserGroup jaf jaf
    DocumentRoot "/home/jaf/public_html"
    ScriptAlias /cgi-bin/ /home/jaf/public_html/cgi-bin/
    </VirtualHost>

This works "billyard.ca/~jaf/cgi-bin/simpletest.cgi".
This fails "billyard.ca/cgi-bin/simpletest.cgi"; it gives me a 500 internal server error and suexec reports "command not in docroot".

  1. To get selinux to allow this (right now I have to go into permissive mode otherwise I get apache "premature end of header" error messages)
jaf0faj
  • 11
  • 2
  • 1
    What have you tried to achieve your wanted results? What has your research concerning your problem shown? Can you provide code of your tries? [How do I ask a good question](https://stackoverflow.com/help/how-to-ask), [How much research effort is expected](https://meta.stackoverflow.com/questions/261592/how-much-research-effort-is-expected-of-stack-overflow-users) and [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) might be helpful to improve your question. – Geshode Jan 12 '18 at 12:55
  • Updated the question to be more clear. – jaf0faj Jan 15 '18 at 11:24

0 Answers0