Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #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
  #2  
Old 2nd November 2008, 16:21
quentusrex quentusrex is offline
Senior Member
 
Join Date: May 2008
Posts: 174
Thanks: 6
Thanked 11 Times in 7 Posts
Default

You could always do it the following way so that all users get access to it. So rather in each individual vhost file, you have one global file. Check my writeup of roundcube on this forum.

Add this to /etc/apache2/apache2.conf
=============
# Include generic snippets of statements
Include /etc/apache2/conf.d/
================

Then add the following file: /etc/apache2/conf.d/phpmyadmin.conf

========================
# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
Options Indexes FollowSymLinks
DirectoryIndex index.php

# Authorize for setup
<Files setup.php>
# For Apache 1.3 and 2.0
<IfModule mod_auth.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
# For Apache 2.2
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</Files>
<IfModule mod_php4.c>
AddType application/x-httpd-php .php

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>
<IfModule mod_php5.c>
AddType application/x-httpd-php .php

php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_value include_path .
</IfModule>
</Directory>

=================================
Reply With Quote
  #3  
Old 3rd November 2008, 11:58
kalua kalua is offline
Member
 
Join Date: Oct 2008
Posts: 30
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thank you! That was indeed very helpful
Reply With Quote
  #4  
Old 3rd November 2008, 13:05
quentusrex quentusrex is offline
Senior Member
 
Join Date: May 2008
Posts: 174
Thanks: 6
Thanked 11 Times in 7 Posts
Default

kalua, once you have these packages setup, do you mind posting a working write up? So that others(and developers) can quickly and easily follow your steps? Maybe even post them in different threads? One for phpmyadmin, one for drupal, etc?

As for drupal, I'd be interested to see how you are going to handle the modules, and the drupal updates. You could also offer drupal 5, and drupal 6 separately. You could have the modules, files, sites, folders as actual folders in the /var/clients/clientX/webY/web folder, and have all of the standard(across all the clients) folders in /usr/share/drupal5/

I look forward to your write up.
Reply With Quote
  #5  
Old 3rd November 2008, 14:18
kalua kalua is offline
Member
 
Join Date: Oct 2008
Posts: 30
Thanks: 3
Thanked 0 Times in 0 Posts
Default

I don't mind writen an howto. In fact I document my steps for myself, so this would just need an cleanup if I'm done.

Currently I'm using drupal in single site mode. So the drupal code resides in an subfolder of an ISPConfig-client.

At this point I have some trouble to setup the rewrite rules. Well they are working but I had to manually add an rule to handle applications in subdirectories on the same level as drupal. I will do some test and maybe I'll report back in a sec and cry for help
Reply With Quote
  #6  
Old 3rd November 2008, 14:26
quentusrex quentusrex is offline
Senior Member
 
Join Date: May 2008
Posts: 174
Thanks: 6
Thanked 11 Times in 7 Posts
Default

I'll be here.
Reply With Quote
Reply

Bookmarks

Tags
apache, directives, packages, vhost

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 5.x/ZM 1.23.1 Setup Guide oakleeman Suggest HOWTO 1 18th February 2008 14:49
Install fails at mkcert.sh momelod Installation/Configuration 2 14th September 2007 01:26
clamav spamassassin with simscan @ debian Shamael Anwar Installation/Configuration 2 15th December 2006 21:06
64-bit Debian 3.1 Install Issue naruto Installation/Configuration 14 5th September 2006 05:12
Selectable install packages. Spum Developers' Forum 4 9th November 2005 17:04


All times are GMT +2. The time now is 06:26.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.