View Full Version : Options ExecCGI Includes
pilpelet
11-14-2003, 03:39 PM
Hello ,
I need to configure a site with cgi scripts that need to run outside
cgi-bin directory and try few things but none work
I tried to ajust httpd.conf from direct admin and to add :
<Directory /home/domainname/domains/domain.com/public_html>
Options +ExecCGI
</Directory>
But it didnt work ,
Anyone knows What is the right format to achive this ?
Thanks in advance ,
DirectAdmin Support
11-14-2003, 04:30 PM
Hello,
You're on the right track...
Admin Panel -> Admin Settings -> custom httpd.conf -> domain.com
in the textarea, add:
<Directory |DOCROOT|>
Options +ExecCGI
</Directory>and click "Save". You may have already done this, but it will require upto one minute for apache to reload, so be patient :)
John
pilpelet
11-14-2003, 04:47 PM
Hi john ,
Thanks it didnt work due to the reload .
Will the config will be overwritten on user ajusting ?
Thanks again .
DirectAdmin Support
11-14-2003, 05:20 PM
Hello,
The setting will stick with user adjusting. It will also be used if that user creates and subdomains etc.. it carries over the entire domain.
John
selfwebhosting
04-28-2006, 08:52 AM
It works!
Just one thing... because the original post and reply was old. The place where you can find the custom httpd.conf file is changed to:
Admin Panel -> Custom HTTPD Configurations -> domain.com
xprotect
04-28-2006, 11:59 AM
Is in DA someting like Custom VirtualHost but for all domains in one time?
DirectAdmin Support
04-28-2006, 12:01 PM
You'd want the virtualhost templates to do all domains:
http://help.directadmin.com/item.php?id=2
John
xprotect
04-29-2006, 01:25 AM
yes, but i want to do it for exits domains too :]
nhwebgroup
10-21-2006, 04:17 PM
I cant get this to work...
<Directory /home/admin/domains/mysite.net/public_html/search/>
Options +ExecCGI
</Directory>
I want to be able to run a cgi script
www.mysite.com/search/test.cgi
the test.cgi test script works fine in the cgi-bin but i cante tet it to work in the /search directroy..
i have added this to the httpd.condif
<Directory /home/admin/domains/mysite.net/public_html/search/>
Options +ExecCGI
</Directory>
in the DA Admin tool
admin » Custom Httpd Configurations » mysite.net
please help....
DirectAdmin Support
10-21-2006, 04:27 PM
Hello,
Try .htacess files instead:
http://help.directadmin.com/item.php?id=7
John
nhwebgroup
10-22-2006, 05:46 AM
tried the htaccess file and it did ntot work
here is the error from the suexec_log
[2006-10-22 08:37:31]: info: (target/actual) uid: (admin/admin) gid: (admin/admin) cmd: test.cgi
[2006-10-22 08:37:31]: error: target uid/gid (1007/1007) mismatch with directory (1007/1004) or program (1007/1004)
in the /search folder i have an .htaccess file
contnets:
Options +ExecCGI
AddHandler cgi-script .cgi .pl
in my custom hpptd.config:
AddHandler cgi-script .cgi
ScriptAlias /cgibin/ /home/admin/domains/mysite.net/public_html/cgibin/
<Directory /home/admin/domains/mysite.net/public_html/search/>
Options +ExecCGI
</Directory>
<Directory |DOCROOT|>
Options +ExecCGI
</Directory>
my test.cgi file:
#!/usr/bin/perl
#output html
print "Content-type: text/html\n\n";
print "<h1>hello world!</h1>";
this test.cgi file works fine in the cgi-bin w/o error..
i'm at a complete loss here...
xemaps
10-22-2006, 09:45 AM
Hello
try this if you have safe_mode on, and cgi allowed
Httpd.conf Customization
php_admin_value safe_mode_exec_dir /home/your_admin/domains/your_domain.tld/public_html/cgi-bin/
cgi scripts chmod 0755 owner your_admin
avoid using another folder
add use an .htaccess with Options -Indexes
nhwebgroup
10-22-2006, 05:08 PM
Ok so i figured this out.. it was a GROUPS issue.. all my files/folders had the wrong groups.. i canged them to use the ADMIN group and POOF themy worked
i keep gettin these errors:
[2006-10-22 07:11:59]: info: (target/actual) uid: (admin/admin) gid: (admin/admin) cmd: test.cgi
[2006-10-22 07:11:59]: error: target uid/gid (1007/1007) mismatch with directory (1007/1004) or program (1007/1004)
with a little diggin i found this to helpful
http://www.slingcode.com/suexec.php
# The UID/GID of the user must match that of public_html, which must also match that of the CGI program.
A while back I set things up so that my public_html was owned by me, but the web server had group access. The reason I did this was because I wasn't running my web server as group users, because I didn't want users pawing through my raw web files.
The cgi.log file was more than happy to point this out:
info: (target/actual) uid: (wls/wls) gid: (users/users) cmd: junk.pl
error: target uid/gid (503/100) mismatch with directory (503/300) or program (503/100)
Note that all three of these values didn't match. Fix 'em, and you're set.
Well good luck....
Webcart
10-22-2006, 06:45 PM
Originally posted by xprotect
yes, but i want to do it for exits domains too :]
If you change virtual_host.conf file and want it to apply to existing domains, execute the following commands:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
and restart Apache:
FreeBSD
/usr/local/etc/rc.d/httpd restart
Centos/RHEL:
service httpd restart
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.