sr.ht-nginx/hub.sr.ht.conf

33 lines
634 B
Plaintext

server {
server_name $hubsrht;
include port80.conf;
# Redirect for legacy.sr.ht
location ~ ^/[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$ {
return 302 https://l.sr.ht$request_uri;
}
}
server {
server_name $hubsrht;
include port443.conf;
ssl_certificate /etc/ssl/uacme/$hubsrht/cert.pem;
ssl_certificate_key /etc/ssl/uacme/private/$hubsrht/key.pem;
location / {
proxy_pass http://127.0.0.1:5014;
include web.conf;
}
location /static {
root /usr/lib/$python/site-packages/hubsrht;
expires 30d;
}
# Redirect for legacy.sr.ht
location ~ ^/[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$ {
return 302 https://l.sr.ht$request_uri;
}
}