squirrelmail, phpmyadmin can install one copy and sharing across all the virtual host.
And it can easily be accomplished when php is configured as mod_php
But I have no ideas how to configure these apps to work with php fastcgi across all virtual host.
I searched thru all forum post but no clue.
I want to when create a new virtual server
http://webmail.virtualserver1.com -> squirrelmail
http://phpmyadmin.virtualserver1.com -> phpmyadmin
http://webmail.virtualserver2.com -> squirrelmail
http://phpmyadmin.virtualserver2.com -> phpmyadmin
http://webmail.virtualserver3.com -> squirrelmail
http://phpmyadmin.virtualserver3.com -> phpmyadmin
I tried using Alias in each virtualhost directive but not work.
For example Alias /phpmyadmin /usr/share/phpmyadmin
My recommendation would be rather than using an alias, set it to actually perform a redirect to one particular domain that’s setup to run phpMyAdmin or Squirrelmail.
The problem you’re seeing is that when you use something like FCGID or CGI, it’s using suexec, the PHP wrappers, and running the apps as the Virtual Server owner. That doesn’t really play nice with the setup you’re attempting.
You could probably do a proxy if you really wanted to, but my recommendation would be to simply have each domain redirect to one central domain that has phpMyadmin and Squirrelmail.