how to run other shared webapp in php fastcgi ?

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 -> squirrelmail -> phpmyadmin -> squirrelmail -> phpmyadmin -> squirrelmail -> 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.