MalacoWiki

wiki of malacology

rsshub

RSSHub是一个开源免费可自建的抓取网页生成RSS的程序。

安装

yay -S rsshub-git
sudo pacman -S pm2

nginx

新建/etc/nginx/sites-enabled/rsshub.conf,替换 YOUR_IP YOUR_KEY_FILE YOUR_CRT_FILE YOUR_DOMAIN 为自己的内容。

server {
            listen 80;
            server_name YOUR_DOMAIN;
            return 301 https://$server_name$request_uri;
}
server {
    listen 443 ssl http2;
    server_name YOUR_DOMAIN;
    ssl_certificate YOUR_CRT_FILE;;
    ssl_certificate_key YOUR_KEY_FILE;
    ssl_session_cache builtin:1000 shared:SSL:10m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
    ssl_prefer_server_ciphers on;
    access_log /var/log/nginx/access.log;
    
    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://YOUR_IP:1200;
        proxy_read_timeout 90;
        proxy_redirect http://YOUR_IP:1200 https://YOUR_DOMAIN;
    }
}

配置

cd /opt/rsshub
vim .env

添加相应的配置文件,此处也可以略过。

pm2

镜像

# 推荐替换镜像
npm config set registry https://registry.npm.taobao.org
# 原镜像
npm config set registry https://registry.npmjs.org/

安装

cd /opt/rsshub
pm2 start lib/index.js --name rsshub

自启

pm2 save
pm2 startup
systemctl reboot
Last updated on 11 Aug 2021
Published on 11 Aug 2021

Powered by Arch. Copyright by Guoyi.