You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
1.4 KiB
54 lines
1.4 KiB
{
|
|
|
|
if ((${'tt-rss'}{'status'} || 'enabled') eq 'enabled'){
|
|
|
|
my $alias = ((${'tt-rss'}{'AliasOnPrimary'} || 'enabled') eq 'enabled' ) ? 'Alias /tt-rss /usr/share/tt-rss':'';
|
|
my $allow = ((${'tt-rss'}{'access'} || 'private') eq 'public') ? 'all':"$localAccess $externalSSLAccess";
|
|
my $auth = ((${'tt-rss'}{'Authentication'} || 'http') eq 'http') ? "AuthName \"Tiny Tiny RSS\"\n" .
|
|
" AuthType Basic\n" .
|
|
" AuthBasicProvider external\n" .
|
|
" AuthExternal pwauth\n" .
|
|
" Require valid-user\n" : '';
|
|
|
|
my $php =<<'_EOF';
|
|
AddType application/x-httpd-php .php
|
|
php_admin_value open_basedir /usr/share/tt-rss:/var/lock/tt-rss:/var/cache/tt-rss:/tmp
|
|
php_admin_value memory_limit 80M
|
|
php_admin_flag allow_url_fopen on
|
|
_EOF
|
|
|
|
if ($fastcgi_mod eq 'mod_fastcgi'){
|
|
$php =<<'_EOF';
|
|
AddHandler phptt-rss-fastcgi .php
|
|
_EOF
|
|
}
|
|
elsif ($fastcgi_mod eq 'mod_proxy_fcgi'){
|
|
$php =<<'_EOF';
|
|
<FilesMatch \.php$>
|
|
SetHandler "proxy:unix:/var/run/php-fpm/php__PHP_VERSION__-tt-rss.sock|fcgi://localhost"
|
|
</FilesMatch>
|
|
_EOF
|
|
}
|
|
|
|
$OUT .=<<"_EOF";
|
|
|
|
$alias
|
|
|
|
<Directory /usr/share/tt-rss>
|
|
$php
|
|
SSLRequireSSL on
|
|
Order deny,allow
|
|
Deny from all
|
|
Allow from $allow
|
|
$auth
|
|
</Directory>
|
|
<Directory /usr/share/tt-rss/schema>
|
|
deny from all
|
|
</Directory>
|
|
_EOF
|
|
}
|
|
else{
|
|
$OUT .= " # TT-RSS is disabled\n";
|
|
}
|
|
|
|
}
|
|
|