Rename and adjust httpd.conf templates

tags/0.2.0
Daniel Berteaud 11 years ago
parent 8d83cf1c31
commit 2d8966e9e6
  1. 36
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Pydio
  2. 7
      root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/60PydioSSL

@ -2,27 +2,27 @@
use esmith::AccountsDB;
if (($ajaxplorer{'status'} || 'disabled') eq 'enabled'){
my $alias = (($ajaxplorer{'AliasOnPrimary'} || 'enabled') eq 'enabled' ) ? 'Alias /ajaxplorer /usr/share/ajaxplorer':'';
my $allow = (($ajaxplorer{'access'} || 'private') eq 'public') ? 'all':"$localAccess $externalSSLAccess";
my $auth = (($ajaxplorer{'Authentication'} || 'http') eq 'http') ? "AuthName \"Ajaxplorer\"\n" .
if (($pydio{'status'} || 'disabled') eq 'enabled'){
my $alias = (($pydio{'AliasOnPrimary'} || 'enabled') eq 'enabled' ) ? "Alias /ajaxplorer /usr/share/pydio\nAlias /pydio /usr/share/pydio":'';
my $allow = (($pydio{'access'} || 'private') eq 'public') ? 'all':"$localAccess $externalSSLAccess";
my $auth = (($pydio{'Authentication'} || 'http') eq 'http') ? "AuthName \"Pydio\"\n" .
" AuthType Basic\n" .
" AuthExternal pwauth\n" .
" Require valid-user\n" : '';
my $maxsize = $ajaxplorer{'MaxUploadSize'} || '200M';
my $homedir = $ajaxplorer{'HomeDir'} || 'none';
my $maxsize = $pydio{'MaxUploadSize'} || '200M';
my $homedir = $pydio{'HomeDir'} || 'none';
$homedir = (($homedir eq 'enabled') || ($homedir eq 'users')) ? ":/home/e-smith/files/users":"";
my $shares = '';
my $public = $ajaxplorer{'PublicShares'} || 'enabled';
my $public = $pydio{'PublicShares'} || 'enabled';
$OUT .=<<"EOF" if ($public eq 'enabled');
Alias /ajxppub /var/lib/ajaxplorer/public
<Directory /var/lib/ajaxplorer/public>
Alias /ajxppub /var/lib/pydio/public
<Directory /var/lib/pydio/public>
Options None
AddType application/x-httpd-php .php
php_admin_value open_basedir /usr/share/ajaxplorer:/var/lib/ajaxplorer:/var/log/ajaxplorer:/etc/ajaxplorer:/var/cache/ajaxplorer:/usr/share/pear/:/home/e-smith/files/shares$homedir
php_admin_value open_basedir /usr/share/pydio:/var/lib/pydio:/var/log/pydio:/etc/pydio:/var/cache/pydio:/usr/share/pear/:/home/e-smith/files/shares$homedir
Order deny,allow
Allow from all
<Files ".ajxp_*">
@ -31,7 +31,7 @@ Alias /ajxppub /var/lib/ajaxplorer/public
<IfModule mod_xsendfile.c>
XSendFile on
XSendFilePath /home/e-smith/files/shares
XSendFilePath /var/lib/ajaxplorer
XSendFilePath /var/lib/pydio
XSendFilePath /home/e-smith/files/users
</IfModule>
</Directory>
@ -42,15 +42,15 @@ EOF
$alias
<Directory /usr/share/ajaxplorer>
<Directory /usr/share/pydio>
AddType application/x-httpd-php .php
php_admin_value open_basedir /usr/share/ajaxplorer:/var/lib/ajaxplorer:/var/log/ajaxplorer:/etc/ajaxplorer:/var/cache/ajaxplorer:/usr/share/pear/:/home/e-smith/files/shares$homedir
php_admin_value open_basedir /usr/share/pydio:/var/lib/pydio:/var/log/pydio:/etc/pydio:/var/cache/pydio:/usr/share/pear/:/home/e-smith/files/shares$homedir
php_admin_value memory_limit 100M
php_admin_value upload_max_filesize $maxsize
php_admin_value post_max_size $maxsize
php_admin_value max_execution_time 900
php_admin_value upload_tmp_dir /var/lib/ajaxplorer/tmp
php_admin_value session.save_path /var/lib/ajaxplorer/tmp
php_admin_value upload_tmp_dir /var/lib/pydio/tmp
php_admin_value session.save_path /var/lib/pydio/tmp
php_admin_value output_buffering off
SSLRequireSSL on
Order deny,allow
@ -60,7 +60,7 @@ $alias
<IfModule mod_xsendfile.c>
XSendFile on
XSendFilePath /home/e-smith/files/shares
XSendFilePath /var/lib/ajaxplorer
XSendFilePath /var/lib/pydio
XSendFilePath /home/e-smith/files/users
</IfModule>
</Directory>
@ -71,9 +71,9 @@ EOF
else {
$OUT .=<<'EOF';
# Ajaxplorer is disabled
# Pydio is disabled
# You can enable it with
# db configuration setprop ajaxplorer status enabled
# db configuration setprop pydio status enabled
# signal-event webapps-update
EOF

@ -1,13 +1,14 @@
{
my $sslport = $modSSL{'TCPPort'} || '443';
my $status = $ajaxplorer{'status'} || 'enabled';
my $alias = $ajaxplorer{'AliasOnPrimary'} || 'enabled';
my $status = $pydio{'status'} || 'enabled';
my $alias = $pydio{'AliasOnPrimary'} || 'enabled';
if (($port ne $sslport) && ($status eq 'enabled') && ($alias eq 'enabled')){
## Redirect Web Address to Secure Address
$OUT .= " RewriteEngine on\n";
$OUT .= " RewriteRule ^/ajaxplorer(/.*|\$) https://%{HTTP_HOST}/ajaxplorer\$1 \[L,R\]\n";
$OUT .= " RewriteRule ^/ajaxplorer(/.*|\$) https://%{HTTP_HOST}/pydio\$1 \[L,R\]\n";
$OUT .= " RewriteRule ^/pydio(/.*|\$) https://%{HTTP_HOST}/pydio\$1 \[L,R\]\n";
}
}
Loading…
Cancel
Save