View Single Post
  #1  
Old 2nd November 2008, 16:16
kalua kalua is offline
Member
 
Join Date: Oct 2008
Posts: 30
Thanks: 3
Thanked 0 Times in 0 Posts
Default ISPC3: howto install packages and make them accessible through https

Hi,

I want to install some packages like phpmyadmin, drupal, mailman or webmailclients and make them accessible only through https.

This is currently not possible with the frontend. Here are the steps I did to get it to work:

# phpmyadmin
I installed the debian package, so phpmyadmin is in /usr/share/phpmyadmin
The client directory is in /var/www/domain.tld/ and the documentroot in /var/www/domain.tld/web

I also created an subdomain in ISPConfig to get access via phpmyadmin.domain.tld or domain.tld/phpmyadmin
The necessary rewrite rules are created by ISPConfig

phpmyadmin bring its own .htaccess and I want to use this because I think this is the easiest way. But unfortunately I had to change the Options and AllowOverride directives in the vhost definition. It would be better if every subdomain get its own directory definition with own Options/AllowOverride/etc

So I created such an directory definition which controls access for the folder /var/www/domain.tld/

But the vhost-generation script writes the client/web path as /var/www/client0/web1
I'm not sure why and what are the benefits, but I think its not good to mix the paths as this causes some permission problems.

Therefore I decided to use everywhere the schema /var/www/domain.tld

This is my Directory definiton:
Code:
<Directory /var/www/domain.tld/web/phpmyadmin>
        Options Indexes +FollowSymlinks Multiviews
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>
This code needs to be written in the ssl-vhost configuration, if you want it there. If you are happy with unencrypted connections put it in the standard *:80 vhost configuration.

Now I created an symlink:
Code:
ln -s /usr/share/phpmyadmin /var/www/domain.tld/web/phpmyadmin
After restarting apache I had access to phpmyadmin via https://domain.tld/phpmyadmin

# drupal
As my drupal installation resides in the /var/www/domain.tld/web and not in /var/www/domain.tld/web/drupal I had to change the default directory definition. Maybe putting drupal (or any other cms) in an subdirectory is the cleaner way... and maybe I'll change my installation again

The benefit would be that all applications (drupal, phpmyadmin...) have an subfolder in the standard webroot. Through separate Directory definitions every application could get its private configuration.

Drupal needs some rewrite rules to enable CleanURLs. I modified the directory definition to allow the use of the drupal .htaccess

# mailman
Well... its not done yet. I hope its similar to what I wrote above. If there are any problems I'll post it here.

The problem with my way above is, that every change via ISPConfig would remove my editing. That's not a big problem now because I have root access, but for the future it would be nice if the frontend could handle the installation, or better preparation, for standard web applications.

Any comments are welcome...
Reply With Quote
Sponsored Links