Re: Cannot get ExecCGI to work with userdir apache 2.4.6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



RESOLVED.

Thank you for the reply.  My users have different home directory paths 
that do not all originate from the /home so (in my case) from error you 
can see in the original post my /users4 is not true for all users, some 
are /users and others /users5.  I wasn't sure how to handle that and 
tried several different things but adding a wild card for each directory 
in the path seemed to do the trick.  Here is what mine looks like now:

<Directory "/*/*/*/public_html">
     Options ExecCGI Indexes FollowSymlinks
     AllowOverride FileInfo AuthConfig Limit Indexes
#    AddHandler cgi-script .py .cgi .pl	
#    Require method GET POST OPTIONS
     Require all granted

Just posting this for anyone that might search google to find and answer 
for.  This is different from 2.2 where /*/public_html worked for the 
entire user directory path.

Sincerely,

Doug Tucker

On 07/20/2015 09:28 AM, Marat Khalili wrote:
> Hello,
>
> According to http://httpd.apache.org/docs/2.4/mod/core.html#directory :
>> None of the wildcards match a `/' character, so |<Directory
>> "/*/public_html">| will not match |/home/user/public_html|, but
>> |<Directory "/home/*/public_html">| will match.
>
>
> --
>
> With Best Regards,
> Marat Khalili
>
>
> On 20/07/15 17:11, Tucker, Doug wrote:
>> I'm at my wits end.  This same configuration works fine on our old
>> apache 2.2.  I have read through the documentation for 2.4 and searched
>> far and wide but cannot seem to solve this.
>>
>> I'm running out of the box apache that came with centos 7.
>>
>> selinux is disabled
>>
>> Main virtual host setting in the main httpd.conf is:
>>
>> <VirtualHost 129.119.119.207:80>
>> ServerAdminenoc@xxxxxxxxxxxx
>>       DocumentRoot "/var/www/html"
>>       ServerName neodev.seas.smu.edu
>>       DirectoryIndex index.php index.shtml index.html index.htm
>>       <Directory "/var/www/html">
>>           Options Includes FollowSymLinks
>>           AllowOverride All
>>           Require all granted
>>       </Directory>
>>       ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
>>       <Directory "/var/www/cgi-bin">
>>           AllowOverride None
>>           Options ExecCGI
>>           Require all granted
>>       </Directory>
>>       ErrorLog logs/neodev-seas-smu-edu-error_log
>>       CustomLog logs/neodev-seas-smu-edu-access_log combined
>> </VirtualHost>
>>
>>
>> My userdir.conf looks like this:
>>
>> <IfModule mod_userdir.c>
>>       #
>>       # UserDir is disabled by default since it can confirm the presence
>>       # of a username on the system (depending on home directory
>>       # permissions).
>>       #
>>       UserDir disabled root
>>
>>       #
>>       # To enable requests to /~user/ to serve the user's public_html
>>       # directory, remove the "UserDir disabled" line above, and uncomment
>>       # the following line instead:
>>       #
>>       UserDir public_html
>> </IfModule>
>>
>> #
>> # Control access to UserDir directories.  The following is an example
>> # for a site where these directories are restricted to read-only.
>> #
>> <Directory "/*/public_html/cgi-bin">
>>       Options Indexes SymLinksIfOwnerMatch IncludesNoExec ExecCGI
>>       AllowOverride None
>>       Require all granted
>> </Directory>
>>
>> Scripts placed in /var/www/cgi-bin work, scripts placed in an user
>> directory/cgi-bin do not.  The apache logs says this:
>>
>> Options ExecCGI is off in this directory:
>> /users4/enoc/tuckerd/public_html/cgi-bin/doug.py
>>
>> The directory is 755.
>>
>> I don't know how more to enable with than with the ExecCGI directive in
>> Options.  I did try putting the + before each directive but the result
>> was the same.  Can anyone please shed some light on what I'm missing?
>> Again this exact same configuration (with the exception of the Require
>> all granted being the old style Allow,deny stuff) works just fine on our
>> apache 2.2.
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx





[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux