Archived
1
0

add nntpchan nginx config for no prefix

This commit is contained in:
Jeff Becker 2016-11-02 08:44:05 -04:00
parent b34b58a0cf
commit 4be03b0b96
No known key found for this signature in database
GPG Key ID: AB950234D6EA286B

View File

@ -0,0 +1,38 @@
#
# config for no prefix
#
server {
listen 80;
location / {
client_max_body_size 50M;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://[::1]:18000/;
}
set $webroot /path/to/nntpchan/repo/webroot;
location /thm/ {
autoindex off;
root $webroot;
}
location /img/ {
autoindex off;
root $webroot;
}
# location for known filetypes
location ~ /img/(.+)\.(jpeg|jpg|png|webp|gif|mp3|ogg|opus|mp4|flac|txt|zip|rar|mp2|flv)$ {
alias $webroot/img/$1.$2;
}
# location for unknown file types
location ~ /img/(.+)\.(+)$ {
types {}
default_type text/plain;
alias $webroot/img/$1.$2;
}
}