最近在折腾RSS阅读提高自己的资讯获取效率,用Tiny-tiny RSS搭了个RSS站点。遗憾的是这款应用不支持原生SSL,得想办法用nginx反代过去。

server {
    server_name yourdomain;
    listen 80;
    return 301 https://$host$request_uri; # 非SSL跳转
}
server
{
    listen 443 ssl;
    server_name yourdomain;
    ssl_certificate 你的crt;
    ssl_certificate_key 你的key;
    index index.php index.html index.htm default.php default.htm default.html;
    proxy_connect_timeout 180;
    proxy_send_timeout 180;
    proxy_read_timeout 180;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarder-For $remote_addr;
    location / {
        proxy_pass http://127.0.0.1:3333/; #反代地址
    }
    #PHP-INFO-START  PHP引用配置,可以注释或修改
    include enable-php-00.conf;
    #禁止访问的文件或目录
    location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
    {
        return 404;
    }
}
Last modification:June 26th, 2019 at 10:26 pm
If you think my article is useful to you, please feel free to appreciate