35 lines
684 B
Plaintext
35 lines
684 B
Plaintext
server {
|
|
include sourcehut.conf;
|
|
include port80.conf;
|
|
server_name $hubsrht;
|
|
|
|
# Redirect for legacy.sr.ht
|
|
location ~ ^/[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$ {
|
|
return 302 https://l.sr.ht$request_uri;
|
|
}
|
|
}
|
|
|
|
server {
|
|
include sourcehut.conf;
|
|
include port443.conf;
|
|
server_name $hubsrht;
|
|
|
|
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;
|
|
}
|
|
}
|