Comments on How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 12.04
How To Set Up Apache2 With mod_fcgid And PHP5 On Ubuntu 12.04 This tutorial describes how you can install Apache2 with mod_fcgid and PHP5 on Ubuntu 12.04. mod_fcgid is a compatible alternative to the older mod_fastcgi. It lets you execute PHP scripts with the permissions of their owners instead of the Apache user.
3 Comment(s)
Comments
not sure if anyone is here to read this... but is this config supposed execute an fcgi instance for subdirectories of the virtual server? I couldn't get it to do that for the life of me... so apparently for my development server, the only way I've been able to make it work is, I have to create separate wrapper scripts for EACH directory!
I have followed this tutorial AMOST to a T... (I had to do a few things differently, to get things to work at all... I'll try to outline the differences here):
==================================={{after the chown of /var/www/web1/web, I had to chmod because it wouldn't work until I did}}
sudo chmod -R g+rwX /var/www/web1/web
======={{I don't recall exactly why (obviously just to make it work, or at least the way I need it to...), but I also changed the /var/www/php-fcgi-scripts/web1/php-fcgi-starter file}}
#!/bin/sh#PHPRC=/var/www/web1/#export PHPRCexport PHP_FCGI_MAX_REQUESTS=5000export PHP_FCGI_CHILDREN=8exec /usr/lib/cgi-bin/php -c /var/www/web1/public_html
======={{for some reason I created the /etc/apache2/sites-available/web1 file with a .conf extension, and as for the contents of that file...}}
<Virtualhost _default_:80> {{don't know where that _default_ came from... clearly I've followed a few bits of advice here and there...}}ServerName web1.192.168.1.69.xip.io {{xip.io provides "wildcard DNS" for self-referential purposes}}ServerAlias 104.197.178.174 {{the public IP for the Google Cloud Platform I was previously testing on}}DocumentRoot /var/www/web1/public_html/
<IfModule...<Directory...Options +ExecCGI -Indexes +FollowSymLinks +MultiViewsAddHandler fcgid-script .php .htm .htmlFCGIWrapper /var/www/php-fcgi-scripts/web1/php-fcgi-starter .phpFCGIWrapper /var/www/php-fcgi-scripts/web1/php-fcgi-starter .htmFCGIWrapper /var/www/php-fcgi-scripts/web1/php-fcgi-starter .html
{{I've also uncommented the logging features and set "LogLevel warn"}}
===================================
and that's about all I have to say at this point. I got it work... the rest of the things I've done are things specific to my project.
Thankx for your time, whoever might answer this!
actuallly..... I must be tired... what I meant was:
is this config supposed to enable processing of php.ini files per-directory? I'm also unsure if php.ini settings are supposed to apply recursively... I'm not even trying to install multiple vhosts - just trying to mimic the environment that my live web host runs on.
ok lol. reporting back. my very logical process, where I used a txt file to document every command and file contents as I went along... well my logic was a little faulty, and I must have forgotten to back out of a "branch of logic" as I was troubleshooting... long story short? my /var/www/php-fcgi-scripts/web1/php-fcgi-starter file custom edits did work, but the default also works, and apparently, loads the default php.ini just fine... now the only problem is that I want individual php.ini files in each folder to be loaded instead... is there a way to automatically make this happen, or an 'acceptable' way to deal with it?(and yeah... I messed up the line breaks on my first comment)