Added CT: freshrss

This commit is contained in:
2023-07-13 00:57:07 +02:00
parent 7d06b09691
commit de5c254ae9
9 changed files with 173 additions and 3 deletions

View File

@@ -0,0 +1 @@
27,57 * * * * php82 /opt/freshrss/app/actualize_script.php 2>> /proc/1/fd/2 > /tmp/FreshRSS.log

View File

@@ -0,0 +1,52 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 64m;
large_client_header_buffers 4 4k;
server_names_hash_bucket_size 64;
root /usr/share/nginx/html;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log off;
error_log /var/log/nginx/error.log;
#Server config for FreshRSS
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /opt/freshrss/p/;
index index.php index.html;
location / {
try_files $uri $uri/ index.php;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php-fpm82/php-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
}

View File

@@ -0,0 +1,39 @@
[freshrss]
user = nginx
group = nginx
listen = /run/php-fpm82/php-fpm.sock
listen.owner = nginx
listen.group = nginx
php_admin_value[disable_functions] = exec,passthru,system
php_admin_value[error_log] = /var/log/php-fpm.error.log
php_admin_value [date.timezone] = Europe/Amsterdam
; OPCACHE SETTINGS
php_admin_value[opcache.memory_consumption] = 256
php_admin_value[opcache.enable] = 0
php_admin_value[opcache.interned_strings_buffer] = 32
php_admin_value[opcache.max_accelerated_files] = 50000
php_admin_value[opcache.max_wasted_percentage] = 5
php_admin_value[opcache.revalidate_freq] = 0
php_admin_value[opcache.validate_timestamps] = 1
; PERFORMANCE LIMITS
php_admin_value[max_input_vars] = 5000
php_admin_value[upload_max_filesize] = 64M
php_admin_value[post_max_size] = 64M
php_admin_value[max_input_time] = 15
; SECURITY
php_admin_value[cgi.fix_pathinfo] = 0
php_admin_value[allow_url_fopen] = 1
php_admin_value[file_uploads] = On
php_admin_value[open_basedir] = /opt/freshrss:/run/php-fpm82/php-fpm.sock:/tmp
php_admin_value[session.use_strict_mode] = 1
php_admin_value[session.cookie_httponly] = 1
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /

View File

@@ -0,0 +1,2 @@
[Date]
date.timezone = Europe/Amsterdam

View File

@@ -0,0 +1,24 @@
#!/bin/ash
#Configure Nginx
rm -rf /etc/nginx/conf.d
mv /opt/Setup/Configs/nginx.conf /etc/nginx/nginx.conf
#Configure Php-Fpm
rm -rf /etc/php82/php-fpm.d/*
mv /opt/Setup/Configs/php.conf /etc/php82/php-fpm.d/freshrss.conf
mv /opt/Setup/Configs/phpTimezone.ini /etc/php82/conf.d/04_date_timezone.ini
#Configure Cron
mv /opt/Setup/Configs/crontab /etc/crontabs/nginx
#Install freshrss
mkdir -p /opt/freshrss
wget https://github.com/FreshRSS/FreshRSS/tarball/latest -O /tmp/freshrss.tar.gz
tar -C /opt/freshrss -xzf /tmp/freshrss.tar.gz --strip 1
chown -R nginx:nginx /opt/freshrss
rm /tmp/freshrss.tar.gz
#Enable services on boot
rc-update add nginx
rc-update add php-fpm82