Jordon.. Have got it working.. Thanks for the input.. Going to start tuning it to my needs now..<div><br></div><div>Can you clarify some things for me..</div><div><br></div><div>I am running mpm-itk and using it to execute php as the owner of the files in the virtual server..</div>
<div><br></div><div>I understand that for each virtual server a new php process will be created and will remain until the time out or the number of requests has been filled..</div><div><br></div><div>Will more than one php process ever be created for a single virtual server? If so how is this controlled?</div>
<div><br></div><div>If I wanted to use APC I would I need to restrict the number of processes for a virtual server to 1 so that it doesn't chew up all the server memory with a separate cache per process?</div><div><br>
</div><div>I have a virtual server with only 512MB ram hosting a couple of drupal sites so APC would be useful but I need to make sure the fcgi processes don't saturate the memory..</div><div><br></div><div>Thanks.<br>
<br><div class="gmail_quote">On 8 August 2011 09:11, Wipe_Out <span dir="ltr"><<a href="mailto:wipe_out@users.sourceforge.net">wipe_out@users.sourceforge.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks Jordon.. I will give it a try..<div><div></div><div class="h5"><br><br><div class="gmail_quote">On 8 August 2011 00:10, Jordon Bedwell <span dir="ltr"><<a href="mailto:jordon@envygeeks.com" target="_blank">jordon@envygeeks.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Snippet from Wipe_Out On 07/08/11 14:13:<br>
<div>> Any help converting from what I have setup to an fcgi setup would be appreciated..<br>
<br>
</div>I'm only going to show you how to do barebones, this will get you up and<br>
running but this isn't secure at all without some sort of real ACL and<br>
suexec, but then again, I don't remember the last time one of my clients<br>
put up an ACL before I was there o.O most of them think suexec is good<br>
enough.  Anyways suexec is easy enough to install and configure so I'll<br>
just give you the basics:<br>
<br>
---<br>
<br>
sudo apt-get install php5-cgi \<br>
apache2 \<br>
libapache2-mod-fcgid \<br>
apache2-mpm-itk --no-install-recommends<br>
<br>
---<br>
<br>
sudo vim /etc/apache2/fcgi.bash<br>
Contents:<br>
<br>
#!/bin/sh<br>
<br>
# The basics<br>
export PHPRC=/etc/php5/cgi/<br>
export PHP_FCGI_CHILDREN=3<br>
export PHP_FCGI_MAX_REQUESTS=5000<br>
<br>
# Time for the fun<br>
exec /usr/lib/cgi-bin/php5<br>
<br>
---<br>
<br>
sudo chmod a+x /etc/apache2/fcgi.bash<br>
<br>
---<br>
<br>
sudo a2dismod authn_file \<br>
authz_default \<br>
authz_groupfile \<br>
authz_user \<br>
autoindex \<br>
cgi \<br>
status \<br>
auth_basic \<br>
authz_user<br>
<br>
---<br>
<br>
sudo echo "AddHandler fcgid-script .php" >> \<br>
/etc/apache2/mods-available/fcgid.conf<br>
<br>
---<br>
<br>
sudo echo "FCGIWrapper /etc/apache2/fcgi.bash .php" >> \<br>
/etc/apache2/mods-available/fcgid.conf<br>
<br>
---<br>
<br>
I love Apache and live by Debian, but, it's disgusting that they think<br>
it's alright to violate FHS and Debian supports it because Apache<br>
foundation does and they don't want to "alienate" users. While one could<br>
argue against /srv/www it's well within FHS.<br>
<br>
sudo rm -rf /var/www<br>
mkdir -p /srv/www<br>
<br>
---<br>
<br>
sudo vim /etc/apache2/sites-available/default<br>
Contents:<br>
<br>
<VirtualHost *:80><br>
        ServerAdmin webmaster@localhost<br>
<br>
        DocumentRoot /srv/www<br>
<br>
        <Directory /srv/www/><br>
                Options -Indexes +FollowSymLinks -MultiViews +ExecCGI<br>
                AllowOverride None<br>
                Order allow,deny<br>
                allow from all<br>
        </Directory><br>
<br>
        LogLevel warn<br>
        ErrorLog ${APACHE_LOG_DIR}/error.log<br>
        CustomLog ${APACHE_LOG_DIR}/access.log combined<br>
</VirtualHost><br>
<br>
---<br>
<br>
echo "<?php phpinfo();" > /srv/www/index.php<br>
<br>
---<br>
<br>
chown www-data:www-data /srv/www/index.php<br>
<br>
---<br>
<br>
sudo service apache2 restart<br>
<br>
---<br>
<br>
firefox <a href="http://localhost" target="_blank">http://localhost</a><br>
<br>
---<br>
<br>
Oh hai, how are you today FCGI and PHP? Nice to see you...<br>
<font color="#888888"><br>
--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com" target="_blank">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
</font></blockquote></div><br>
</div></div></blockquote></div><br></div>