From 22ef4880e565d902aac3875105062de03c3ff8ca Mon Sep 17 00:00:00 2001 From: tbrehm Date: Tue, 15 Jun 2010 14:21:39 +0000 Subject: [PATCH] Implemented: FS#461 - Add Ruby support --- docs/INSTALL_DEBIAN_5.0_courier_mydns.txt | 4 ++-- docs/INSTALL_DEBIAN_5.0_dovecot_bind.txt | 4 ++-- docs/INSTALL_DEBIAN_6.0_courier_mydns.txt | 4 ++-- docs/INSTALL_DEBIAN_6.0_dovecot_bind.txt | 4 ++-- install/sql/ispconfig3.sql | 1 + interface/web/sites/form/web_domain.tform.php | 6 ++++++ interface/web/sites/lib/lang/en_web_domain.lng | 1 + .../web/sites/templates/web_domain_edit.htm | 8 +++++++- server/conf/vhost.conf.master | 18 ++++++++++++++++++ 9 files changed, 41 insertions(+), 9 deletions(-) diff --git a/docs/INSTALL_DEBIAN_5.0_courier_mydns.txt b/docs/INSTALL_DEBIAN_5.0_courier_mydns.txt index c3dae3bb9..bd4e9d48d 100644 --- a/docs/INSTALL_DEBIAN_5.0_courier_mydns.txt +++ b/docs/INSTALL_DEBIAN_5.0_courier_mydns.txt @@ -118,14 +118,14 @@ mkpop3dcert 3) Install apache, PHP5, phpmyadmin, better fastCGI, suexec, Pear and mcrypt (1 line!): -apt-get -y install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libopenssl-ruby +apt-get -y install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libopenssl-ruby libapache2-mod-ruby # When phpMyAdmin is asking weather to configure itself automatically, select "Apache2" # Then run the following to enable the Apache modules suexec, rewrite and ssl: -a2enmod suexec rewrite ssl actions include +a2enmod suexec rewrite ssl actions include ruby # If you want to use webdav then run the following to enable the Apache webdav modules: diff --git a/docs/INSTALL_DEBIAN_5.0_dovecot_bind.txt b/docs/INSTALL_DEBIAN_5.0_dovecot_bind.txt index 21ec3a057..20c6738b7 100644 --- a/docs/INSTALL_DEBIAN_5.0_dovecot_bind.txt +++ b/docs/INSTALL_DEBIAN_5.0_dovecot_bind.txt @@ -86,14 +86,14 @@ apt-get -y install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 3) Install apache, PHP5, phpmyadmin, better fastCGI, suexec, Pear and mcrypt (1 line!): -apt-get -y install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libopenssl-ruby +apt-get -y install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp libopenssl-ruby libapache2-mod-ruby # When phpMyAdmin is asking weather to configure itself automatically, select "Apache2" # Then run the following to enable the Apache modules suexec, rewrite and ssl: -a2enmod suexec rewrite ssl actions include +a2enmod suexec rewrite ssl actions include ruby # If you want webdav then run the following to enable the Apache webdav modules: diff --git a/docs/INSTALL_DEBIAN_6.0_courier_mydns.txt b/docs/INSTALL_DEBIAN_6.0_courier_mydns.txt index 258b50f24..bdbb67d4b 100644 --- a/docs/INSTALL_DEBIAN_6.0_courier_mydns.txt +++ b/docs/INSTALL_DEBIAN_6.0_courier_mydns.txt @@ -112,7 +112,7 @@ mkpop3dcert 3) Install apache, PHP5, phpmyadmin, better fastCGI, suexec, Pear and mcrypt (1 line!): -apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt imagemagick libapache2-mod-suphp libopenssl-ruby +apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt imagemagick libapache2-mod-suphp libopenssl-ruby libapache2-mod-ruby #this package is actual missed on official squeeze repository: php5-imagick @@ -120,7 +120,7 @@ apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2 # Then run the following to enable the Apache modules suexec, rewrite and ssl: -a2enmod suexec rewrite ssl actions include +a2enmod suexec rewrite ssl actions include ruby # If you want webdav then run the following to enable the Apache webdav modules: diff --git a/docs/INSTALL_DEBIAN_6.0_dovecot_bind.txt b/docs/INSTALL_DEBIAN_6.0_dovecot_bind.txt index 84b93cc1e..e3c62753c 100644 --- a/docs/INSTALL_DEBIAN_6.0_dovecot_bind.txt +++ b/docs/INSTALL_DEBIAN_6.0_dovecot_bind.txt @@ -84,14 +84,14 @@ apt-get -y install amavisd-new spamassassin clamav clamav-daemon zoo unzip bzip2 3) Install apache, PHP5, phpmyadmin, better fastCGI, suexec, Pear and mcrypt (1 line!): -apt-get -y install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt imagemagick libapache2-mod-suphp libopenssl-ruby +apt-get -y install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap phpmyadmin php5-cli php5-cgi libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt imagemagick libapache2-mod-suphp libopenssl-ruby libapache2-mod-ruby # When phpMyAdmin is asking weather to configure itself automatically, select "Apache2" # Then run the following to enable the Apache modules suexec, rewrite and ssl: -a2enmod suexec rewrite ssl actions include +a2enmod suexec rewrite ssl actions include ruby # restart apache before continuing diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index f09766d4d..beab7409e 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1064,6 +1064,7 @@ CREATE TABLE `web_domain` ( `is_subdomainwww` tinyint(1) NOT NULL default '1', `subdomain` enum('none','www','*') NOT NULL default 'none', `php` varchar(32) NOT NULL default 'y', + `ruby` enum('n','y') NOT NULL default 'n', `redirect_type` varchar(255) default NULL, `redirect_path` varchar(255) default NULL, `ssl` enum('n','y') NOT NULL default 'n', diff --git a/interface/web/sites/form/web_domain.tform.php b/interface/web/sites/form/web_domain.tform.php index 7b0535249..9d7a1c15f 100644 --- a/interface/web/sites/form/web_domain.tform.php +++ b/interface/web/sites/form/web_domain.tform.php @@ -193,6 +193,12 @@ $form["tabs"]['domain'] = array ( 'valuelimit' => 'client:web_php_options', 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP') ), + 'ruby' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), 'active' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', diff --git a/interface/web/sites/lib/lang/en_web_domain.lng b/interface/web/sites/lib/lang/en_web_domain.lng index b26014db9..84ae4d064 100644 --- a/interface/web/sites/lib/lang/en_web_domain.lng +++ b/interface/web/sites/lib/lang/en_web_domain.lng @@ -58,4 +58,5 @@ $wb["limit_traffic_quota_free_txt"] = 'Max. available Traffic Quota'; $wb["redirect_error_regex"] = 'Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/'; $wb["php_open_basedir_txt"] = 'PHP open_basedir'; $wb["traffic_quota_exceeded_txt"] = 'Traffic quota exceeded'; +$wb["ruby_txt"] = 'Ruby'; ?> diff --git a/interface/web/sites/templates/web_domain_edit.htm b/interface/web/sites/templates/web_domain_edit.htm index d69a3f993..42c9ed192 100644 --- a/interface/web/sites/templates/web_domain_edit.htm +++ b/interface/web/sites/templates/web_domain_edit.htm @@ -70,7 +70,13 @@
{tmpl_var name='ssi'}
- + +
+

{tmpl_var name='ruby_txt'}

+
+ {tmpl_var name='ruby'} +
+

{tmpl_var name='suexec_txt'}

diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 9995e7605..5d5f5da24 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -66,6 +66,24 @@ AddOutputFilter INCLUDES .shtml Options +Includes + + + + Options +ExecCGI + + RubyRequire apache/ruby-run + #RubySafeLevel 0 + + SetHandler ruby-object + RubyHandler Apache::RubyRun.instance + + + SetHandler ruby-object + RubyHandler Apache::RubyRun.instance + + + + Order allow,deny -- GitLab