{ 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'; SetHandler "proxy:unix:/var/run/php-fpm/php__PHP_VERSION__-tt-rss.sock|fcgi://localhost" _EOF } $OUT .=<<"_EOF"; $alias $php SSLRequireSSL on Order deny,allow Deny from all Allow from $allow $auth deny from all _EOF } else{ $OUT .= " # TT-RSS is disabled\n"; } }