Scaling Development Resources

software development

#1

I have about 10 or 15 development websites that I’m working on in my account and since I want to deploy them with PHP running as CGI module, I have to setup every domain with its own CGI settings, which is time consuming to say the least, but also setting up cronjobs so they can updated weekly and securing php.ini individually, add to the tasklist. Now I’m just hoping if its possible to have one single directory /home/user/cgi-bin directory with all the files in it and let the .htaccess file in individual projects load the php.cgi and php.ini from a single cgi-bin directory, that way I will just have to pay attention to the security of one php.ini and all the projects can propagate the settings from there. Do you think its possible? or is there a better way to do it?

I have given it a shot but it doesn’t seems to be working but I haven’t really spent a whole lot of time in it to reach this conclusion.


#2

are these all in the same DH user home? If you can’t get links (hard or soft (and hard is an option since everything is on the same fs)) working in your home directory, I’ll never get it working from /dh

are you starting small - just 2 directories - for testing?


#3

Just wanted to update, I was able to implement the solution successfully.

Make sure you include this in your .htaccess file
Options +FollowSymLinks

The rest is easy, pretty much create a cgi-system directory in the your home directory and copy all the files required to run php as a cgi module. Create a symlink ‘cgi-bin’ which is pointing back to cgi-system in the home directory.

I have transfered all my 22 projects and everything is working great. Don’t forget to add the following in .htacess as well
Options +ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi

Last but not the least setup a cronjob to update the php.cgi weekly/daily.

Have fun…