phpMyAdmin and Horde

Hello there,

How I can correctly run phpMyAdmin and Horde under the secure port 443? I have searched everywhere and none of the things I find work properly.

I have horde and phpmyadmin installed at /usr/share/horde and /usr/share/phpmyadmin.

I want to allow access to these from all virtual servers on the secure port 443 or the same port that webmin runs on (I put mine on 8443 because thats how my users know where to access Plesk from the old server). However port 443 doesn’t seem to be going into all virtual servers for some reason and port 8443 doesn’t seem to run PHP or something. If I copy the phpmyadmin and horde installs to the /usr/libexec/webmin folder and try to run them it only displays the php code.

443 seems only setup for my main domain on the server I believe. I am not sure how to properly make it possible for every new domain added to virtualmin have redirect /phpmyadmin to the install of phpmyadmin and /horde to the install of horde. Actually I am trying to make http://webmail.domain.com redirect to https://www.domain.com/horde because on my old server the users all know how to get to webmail at the webmail subdomain.

What is the best way to do what I am trying to do? I can get them to redirect to the install but not on the secure port for some reason.

I hopefully someday soon will be able to upgrade to Virtualmin PRO but for now I just have the free version which I manually installed by accident. If I had the Pro version I understand it is much easier to install phpmyadmin using an install script but the free version doesn’t have that I don’t think.

Thank you =)

Howdy,

What I would suggest is picking a “primary” domain name for your server (in this case, I’ll use “example.com”) – then create a Virtual Server for that domain name, and install your web apps within it.

So, you would setup example.com as a Virtual Server, and enable SSL on it.

Then, put Horde and phpMyAdmin within example.com’s public_html directory that gets generated when you create a Virtual Server.

At that point, you can go into System Settings -> Server Templates -> Default -> Apache Website, and you can setup webmail.domain.com redirect to http://example.com/horde – which would use the central "system" Horde that you setup in the example.com Virtual Server.
-Eric

When you say put them in public_html…do you mean put symlinks to them?

When you say put them in public_html...do you mean put symlinks to them?

If you strongly prefer to use the OS versions, then you’d probably want to set up those paths in the configuration file for that VirtualHost. symlinks might work, but that would depend on the application, and whether you can configure it to store things in user-owned locations (assuming you’re using suexec, which may or may not be preferred). So, you’d want a Directory section and an alias pointing to each of those directories. Something like:

Alias /horde/ /usr/share/horde
<Directory /usr/share/horde>

</Directory>

I’m not actually sure what ought to go in the middle there (the “…” bit). You probably need the usual PHP setup stuff, and that’ll depend on whether you want suexec or not.

Thank you for your response =)

It seems like it kind of worked without suphp installed. It actually would bring up a certificate error of some sorts but thats likely because it was self-signed.

Now what if I am running suphp? It seems like it might be kind of hard to make it work like this on the GPL version of Virtualmin. I did manage to get suphp setup and working… I think.

I am also trying to find out how to execute a command after the virtual domain is created using that virtual domains params. I can edit the server template to run commands but ${DOM} and ${HOME} correspond to root user instead of the virtual domain user.

I was trying to make open base dir echo into php.ini in the users public_html folder and thats the only way I could think to do that for each virtual domain.

Ryan

Thank you for your response =)

It seems like it kind of worked without suphp installed. It actually would bring up a certificate error of some sorts but thats likely because it was self-signed.

Now what if I am running suphp? It seems like it might be kind of hard to make it work like this on the GPL version of Virtualmin. I did manage to get suphp setup and working… I think.

I am also trying to find out how to execute a command after the virtual domain is created using that virtual domains params. I can edit the server template to run commands but ${DOM} and ${HOME} correspond to root user instead of the virtual domain user.

I was trying to make open base dir echo into php.ini in the users public_html folder and thats the only way I could think to do that for each virtual domain.

Ryan

Now what if I am running suphp?

How would I know? We don’t use suphp for anything, and I haven’t touched it in years. We use standard suexec, with mod_fcgid, which works great.

But, you can’t don’t want to do that for your system-wide applications; they can’t be owned by everybody, and suexec runs those scripts as the owner of the files. So, you either want a per-domain installation running under suexec, or you want a system-wide version running as one particular user (whether that is the Apache user, or some other user is up to you…but if you’re using things installed from packages, then it’ll have to be the Apache user).

I think you’re conflating too many different questions here for me to give a sensible response. I’m confusing myself just trying to explain the possibilities.

So, I’m just gonna punt and try to answer each piece in turn:

It seems like it might be kind of hard to make it work like this on the GPL version of Virtualmin.

Again, I know nothing of suphp, because we don’t use it. But getting suexec and mod_fcgid working with PHP apps is pretty easy. It’s well documented somewhere in the forums…I’m pretty sure it’s a stickied thread in the Virtualmin forum, actually, and searching for “suexec mod_fcgid php gpl” will almost certainly bring up the thread, as well. If you have trouble finding that thread, let me know.

I can edit the server template to run commands but ${DOM} and ${HOME} correspond to root user instead of the virtual domain user.

That doesn’t make any sense. Did you set the “owner” of the domain to be root, or something? I can’t think of any way those variables would be populated with root.

I was trying to make open base dir echo into php.ini in the users public_html folder and thats the only way I could think to do that for each virtual domain.

I have no idea what this sentence means. :wink:

Sorry for the confusion. I guess its just my confusion shining its light on you.

I think this is the post you are referring to:
http://www.virtualmin.com/forums/virtualmin/convert-php-sites-to-use-mod_fcgid-with-suexec.html

I will see if I can get it to work like that instead because it sounds like thats what would be best for security and making it all work the way it should.

It also sounds like my problem might be that I simply have to setup horde and phpmyadmin to run on a single domain instead of worrying about making a single install work through multiple domains. Then I can just set the apache redirects to that address.

I can edit the server template to run commands but ${DOM} and ${HOME} correspond to root user instead of the virtual domain user.
And last but not least, sorry but I have given you some wrong information which is probably another part of the confusion problem. I told you I edited the server template to put those variables in there but what I actually edited was the Module Config of Virtualmin Virtual Servers (GPL).

Under the option "Command to run after making changes to a server" I have inserted:

[code:1]echo "open_basedir = /var/www/vhosts/${DOM}/httpdocs:/tmp:/usr/share/pear:/local/PEAR" > ${HOME}/httpdocs/php.ini[/code:1]

I had no idea if this would work but it was the only thing I could think of that might be able to do what I was trying to do.

That doesn't make any sense. Did you set the "owner" of the domain to be root, or something? I can't think of any way those variables would be populated with root.
Looking at it now I can guess why the results are root instead of the domain user. Because it is in the Module Config and not the Server Template. If there is one in the Server Template I can't find it anywhere.

You guys are really helpful. I am glad you offer your support like this. I think I need a personal assistant/adviser. Does one come with the professional version? =)