Setting up PHP CGI with Apache suEXEC and VirtualHost
[email protected] ("Amen")
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
Hi All,
How to configure httpd.conf so that PHP CGI run as userid under VirutalHost
I have compiled Apache with suexec and VirutalHost function.
my configure like this
<VirturalHost 192.168.0.1>
ServerName www.abc.com
DocumentRoot /home/mark/public_html
ScriptAlias /cgi-bin/ "/home/mark/public_html/cgi-bin"
ScriptAlias /sys-bin/ "/home/sys-bin/"
AddHandler application/x-httpd-php php
Action application/x-httpd-php "/sys-bin/handler_php.sh"
User mark
Group mark
</VirtualHost>
Content of handler_php.sh
----------------------------------------------------------------
#!/bin/bash
/usr/local/php/bin/php $PATH_TRANSLATED
----------------------------------------------------------------
Becuase I have configured Apache with suEXEC so that the /sys-bin/ and
handler_php.sh must be own by mark.mark. And I have to make different
sys-bin/handler_php.sh for different user. The most worst thing is that user
can modify my handler_php.sh since they have the ownership.
Help me. I have been crazy to solve this problem, Any clues?
Amen