summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-07-02 01:40:17 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-07-02 01:40:17 +0900
commit3e0fe6ac296db73765b525969ad37fef80c6bed1 (patch)
tree2fa35783611abef83af916d81e31afacb396ebde
parent516f632b84bc418486538a2183564fe94b89097e (diff)
modified content/rss-full-text.md
-rw-r--r--content/rss-full-text.md72
1 files changed, 57 insertions, 15 deletions
diff --git a/content/rss-full-text.md b/content/rss-full-text.md
index 995797d..167ab4c 100644
--- a/content/rss-full-text.md
+++ b/content/rss-full-text.md
@@ -23,30 +23,38 @@ Check PHP version (e.g., php7.4-fpm). Adjust in later steps accordingly.
```sh
sudo apt update
-sudo apt install nginx php php-fpm php-tidy git unzip certbot python3-certbot-nginx
+sudo apt install php5.6 php5.6-fpm php5.6-tidy nginx git unzip certbot python3-certbot-nginx
```
Download Full-Text RSS
```sh
cd /var/www
-sudo git clone https://bitbucket.org/fivefilters/full-text-rss.git
-cd full-text-rss
+sudo git clone https://bitbucket.org/fivefilters/full-text-rss.git ftr
+cd ftr
sudo git reset --hard 384d52fd83361ffd6e7f28bd39b322970a015a28
```
Download Full-Text-RSS site config
```sh
-sudo git clone https://github.com/fivefilters/ftr-site-config site_config
+sudo git clone https://github.com/fivefilters/ftr-site-config
+cp -f ftr-site-config/* site_config/standard
```
Set permissions:
```sh
-sudo mkdir -p cache/rss
-sudo chown -R www-data:www-data cache site_config
-sudo chmod -R 777 cache site_config
+mkdir -p /var/www/ftr/cache/rss
+sudo chown -R www-data:www-data /var/www/ftr
+sudo chmod -R 777 /var/www/ftr/cache /var/www/ftr/site_config
+```
+
+Create php.ini:
+
+```sh
+mkdir -p /etc/php/5.6/fpm
+sed -Ei "s/^(memory_limit).*/\1 = 256M/" /etc/php/5.6/fpm/php.ini
```
### Configuring nginx & cerbot
@@ -56,7 +64,7 @@ Create Nginx Config with Clean /feed + Rate Limiting
Create a new site config:
```sh
-sudo nano /etc/nginx/sites-available/fulltextrss
+sudo vim /etc/nginx/sites-available/ftr
```
Paste this (adjust php7.4-fpm.sock if needed):
@@ -67,10 +75,15 @@ limit_req_zone $binary_remote_addr zone=ratelimit:10m rate=10r/m;
server {
listen 80;
- server_name rss.thesiah.xyz; # Change to your domain
+ listen [::]:80;
- root /var/www/full-text-rss;
- index index.php;
+ server_name ftr.thesiah.xyz; # Change to your domain
+ root /var/www/ftr;
+ index index.html index.htm index.nginx-debian.html index.php;
+
+ location / {
+ try_files $uri $uri/ =404;
+ }
# Rewrite clean URL /feed?url=... to makefulltextfeed.php
location /feed {
@@ -92,20 +105,25 @@ server {
Enable nginx on the site:
```sh
-sudo ln -s /etc/nginx/sites-available/fulltextrss /etc/nginx/sites-enabled/
-sudo nginx -t && sudo systemctl reload nginx
+sudo ln -s /etc/nginx/sites-available/ftr /etc/nginx/sites-enabled/
```
Secure with HTTPS (Certbot)
```sh
-sudo certbot --nginx -d rss.thesiah.xyz
+sudo certbot --nginx -d ftr.thesiah.xyz
+```
+
+Restart nginx
+
+```sh
+sudo systemctl reload nginx
```
### Custom Config
Add custom_config.php:
-Save to: /var/www/full-text-rss/custom_config.php
+Save to: /var/www/ftr/custom_config.php
```php
<?php
@@ -194,6 +212,30 @@ if (basename(__FILE__) == 'config.php') {
}
```
+Replace deprecated code manually from:
+
+```php
+while (list($name, $value) = each($directives)) {
+```
+
+to:
+
+```php
+foreach ($directives as $name => $value) {
+```
+
+Or run this command:
+
+```sh
+sed -i 's/while *(list(\$name, *\$value) *= *each(\$directives)) *{/foreach (\$directives as \$name => \$value) {/' /var/www/ftr/libraries/Zend/Cache/Backend.php
+```
+
+Restart php5.6-fpm:
+
+```sh
+sudo systemctl restart php5.6-fpm
+```
+
### Local host
Visit http://localhost:80 for the integrated web UI