Got a problem related to fcgid + apache alias + delete domain in virtualmin (VM), please give help if anyone encounter the same.
Currently using VM GPL, one day after update the VM which have the fcgid function. the server got a bit different:
1.) Before update, i have roundcube and phpmyadmin installed in /usr/share/, make apache alias so all site support to run both apps in this format http://www.domain.tld/phpmyadmin/ and http://www.domain.tld/roundcube/. After update VM with fcgid, I found that when I create new site, cant access it anymore, seems all php code didnt read by apache. finally prove my assumption is correct. cause i modify the apache script in the section. I removed the script “Removehandler .php” and then phpmyadmin and roundcube site run well again. I tried to move the phpmyadmin and rouncube to the home folder which belong to the domain itself, it is just no problem without any code modify.
my question is: why this happen? and is that mean i cant keep phpmyadmin and roundcube in /usr/share/ anymore?
2.) i tired to delete the domain which i created for testing the above, say a.domain.tld, b.domain.tld. I found that the site was deleted from the list but actually many data and info still keep in VM, e.g. apache virtualhost record, DNS record still there. It is abnormal. I also find that the home directory for that domain still there. i rm -rf the home directory for that domain and find that the fcgi folder in it can’t be delete. i am thinking if this is related to why the operation cannot delete all the data for that domain completely.
please give assistant. thanks a lot.
The simplest way of setting up an application for multiple users is to actually install it in one specific domain, and simply have users browse to that domain to reach the application.
The issue is that with things like fcgid and cgi alongside suexec, it’s actually not straight forward to get apps in /usr and owned by various users working.
Suexec wants to see apps running in /home, and the files owned by the Virtual Server owner.
One way to solve that would be to setup not an alias, but a redirect, for /phpmyadmin/ and /roundcube/.
With that, users could still go to theirdomain.tld/phpmyadmin/, and it could redirect to the domain that hosts those applications.
As far as your last point goes – when deleting a Virtual Server, all data for that Virtual Server should be deleted.
If that’s not what you’re seeing, that’s odd! There may be something awry with your setup that we may need to look into further. Is that behavior you can reproduce?
If so, my suggestion would be to file a bug report using the Support link above.
Hi Eric and all,
Just want to follow up a bit about the last post by Eric.
Okay, it is fine to have redirection. But Is it possible to solve the following 2 points?
The FQDN of the server is server.fqdn.com, there is virtual host a.com and b.com exist in this server.
phpmyadmin is installed correctly and able to reach and run with the URL http://server.fqdn.com/phpmyadmin/
1.) is it possible to set the redirection (or any masking method) when user type http://phpmyadmin.a.com OR http://a.com/phpmyadmin/ and then able to access. http://server.fqdn.com/phpmyadmin/. Ok, here I mean: I really don’t want my FQDN to be display in the URL and still keep a.com something show in the URL.
2.) If site migration need to perform in the future, say from server.fqdn.com to server2.fqdn.com. Will problem be raise when apache config doing migration? Cause the common-program (e.g. roundcube and phpmyadmin) are installed “on top” of old domain (server.fqdn.com).
According to my knowledge, Q1 is no way to solve and must change the URL when doing redirection. Q2 also need manual update. Am I correct?
Thanks in advance.
For question #1, if you’re saying you don’t actually want the browser to redirect to a URL that has server.fqdn.com in it, you could always setup a proxy.
Personally, I’d use the redirect and have the browser show server.fqdn.com.
However, if that’s not what you want, you could go into Server Configuration -> Proxy Paths, and setup proxying for that path.
For question #2 – I believe you’d have to do a manual update there, that’s correct. Of course, since all of that is defined within the Apache config, you could always create a script to help you out. However, I don’t believe there would be a simpler method than that.
Thanks Eric. This clear all my problems.