gitea2rss/doc/nginx-example.conf

35 lines
1.2 KiB
Plaintext

# Use 100 MiB cache with a 1 MiB memory zone (enough for ~8,000 keys).
# Delete data that has not been accessed for 10 minutes.
fastcgi_cache_path /var/cache/nginx/gitea2rss levels=1:2 keys_zone=gitea2rss:1m
max_size=100m inactive=10m use_temp_path=off;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
add_header X-Cache $upstream_cache_status;
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name rss.example.com;
error_log /var/log/nginx/rss.example.com_log warn;
ssl_certificate /var/lib/dehydrated/certs/rss.example.com/fullchain.pem;
ssl_certificate_key /var/lib/dehydrated/certs/rss.example.com/privkey.pem;
# Tell clients to cache for 30 minutes.
expires 30m;
location / {
include /etc/nginx/fastcgi_params;
# You may need to change fastcgi_pass.
fastcgi_pass unix:/var/run/cgi-fcgiwrap.socket-1;
fastcgi_param SCRIPT_FILENAME /usr/bin/gitea2rss;
# Base URL of your Gitea instance.
fastcgi_param GITEA2RSS_BASEURL "https://git.example.com";
fastcgi_cache gitea2rss;
fastcgi_cache_valid 200 10m; # Cache answers for up to 10 minutes.
fastcgi_cache_lock on; # Relay only one identical request at a time.
}
}