The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
suexec problem harrstar UNIX for Advanced & Expert Users 0 03-07-2008 01:32 PM
install apache2 in bsd 6.2 tamayo BSD 2 12-04-2007 11:29 AM
apache2 ldap hassan1 Linux 0 01-29-2006 09:02 AM
apache suexec hassan1 UNIX for Advanced & Expert Users 0 08-03-2005 04:56 PM
Suexec solution the_last_rites UNIX for Dummies Questions & Answers 13 01-18-2005 04:14 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-27-2008
Registered User
 

Join Date: Jan 2008
Posts: 1
How to use Suexec with Apache2 ?

Hello guys

I'm trying to use Suexec in my computer. I've installed apache with default settings (so Suexec is installed with my emerge Apache , Gentoo) .

My settings on /etc/conf.d/apache2
Code:
# SUEXEC Enables running CGI scripts (in USERDIR) through suexec.
# USERDIR Enables /~username mapping to /home/username/public_html
#
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D SUEXEC -D PHP5 -D USERDIR "
When I'm restarting my apache, I've the correct line on my log who indicate Suexec is running well :
Code:
[Sat Jan 26 15:33:39 2008] [notice] Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7i PHP/5.2.5-pl0-gentoo configur$
[Sat Jan 26 15:41:44 2008] [notice] caught SIGTERM, shutting down
[Sat Jan 26 15:41:46 2008] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jan 26 15:41:47 2008] [notice] Digest: generating secret for digest authentication ...
[Sat Jan 26 15:41:47 2008] [notice] Digest: done
I create an user
/usr/sbin/useradd evolv -m -s /bin/bash

In /var/www/evolv/public_html folder, I create php file with :
"<?php echo "user: ".exec('whoami');?>"

My vhost below :
Code:
<VirtualHost *:80>
ServerAdmin webmaster@evolv.com
DocumentRoot /var/www/evolv/public_html
ServerName www.evolv.com
ServerAlias evolv.com
SuexecUserGroup evolv evolv
CustomLog /var/log/apache2/evolv-web-access_log combined
ErrorLog /var/log/apache2/evolv-web-error_log
<Directory />
AllowOverride All
Options FollowSymLinks -Indexes Includes ExecCGI
</Directory>
</VirtualHost>
Code:
# suexec -V
-D AP_DOC_ROOT="/var/www"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="apache"
-D AP_LOG_EXEC="/var/log/apache2/suexec_log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_SUEXEC_UMASK=077
-D AP_UID_MIN=1000
-D AP_USERDIR_SUFFIX="public_html"
SuexecUserGroup is well using because, if I changed anything in this line, I have an error when I'm restarting apache. So, no error on apache restart, but always : "user: apache"! What's wrong ?

Sorry for my poor english , I'm french!

Thanks all
Bye
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-10-2008
Registered User
 

Join Date: Mar 2008
Posts: 1
Hi,

suexec only works together with a cgi or fcgi wrapper. That means you have to install php so that it can be run under cgi/fcgi.

Exactly what to do depends on your os/configuration.

Harry
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 08:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0