Deploy rsshub
rsshub server listen 127.0.0.1:1200
docker-compose.yml
version: '3'
services:
rsshub:
image: 'diygod/rsshub'
Deploy nginx
docker-compose.yml
version: '3'
services:
nginx:
image: 'cntrump/ubuntu_nginx_boringssl'
volumes:
- /opt/nginx/etc:/etc/nginx
- /opt/nginx/log:/var/log/nginx
- /opt/nginx/cache:/var/cache/nginx
- /opt/www:/var/www
ports:
- '80:80'
- '443:443'
command: /usr/sbin/nginx -g "daemon off;"
Reverse proxy, using http 1.1 with tls 1.2/1.3
nginx.conf
{
...
# HTTPS server
server {
listen 443 ssl;
server_name localhost;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_certificate /etc/nginx/certs/fullchain.pem;
ssl_certificate_key /etc/nginx/certs/privkey.pem;
location / {
proxy_redirect off;
proxy_pass http://rsshub:1200; # rsshub is service name which defined in docker-compose.yml
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
# Show realip in v2ray access.log
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}