-
upstream derpy_upstream {
-
server localhost:8080 fail_timeout=0;
-
}
-
-
server {
-
listen 80;
-
#listen 8080;
-
-
server_name twibooru.local;
-
-
root /home/anon/project-dir/public;
-
-
-
location ^~ /.well-known/acme-challenge/ {
-
root /tmp/letsencrypt/;
-
}
-
-
location ~ ^/img/view/(.+)/([0-9]+).*\.([A-Za-z]+)$ {
-
expires max;
-
add_header Cache-Control public;
-
alias "/home/anon/project-dir/public/system/images/thumbs/$1/$2/full.$3";
-
}
-
-
location ~ ^/img/download/(.+)/([0-9]+).*\.([A-Za-z]+)$ {
-
add_header Content-Disposition "attachment";
-
expires max;
-
add_header Cache-Control public;
-
alias "/home/anon/project-dir/public/system/images/thumbs/$1/$2/full.$3";
-
}
-
-
location ~ ^/img/(.+) {
-
expires max;
-
add_header Cache-Control public;
-
alias /home/anon/project-dir/public/system/images/thumbs/$1;
-
}
-
-
location ~ ^/spns/(.+) {
-
expires max;
-
add_header Cache-Control public;
-
alias /home/anon/project-dir/public/system/images/adverts/$1;
-
}
-
-
location ~ ^/avatars/(.+) {
-
expires max;
-
add_header Cache-Control public;
-
alias /home/anon/project-dir/public/system/images/avatars/$1;
-
}
-
-
location ~ ^/media/(.+) {
-
expires max;
-
add_header Cache-Control public;
-
alias /home/anon/project-dir/public/system/images/$1;
-
}
-
-
location /error_502.html {
-
}
-
-
location / {
-
proxy_pass http://derpy_upstream;
-
#proxy_pass http://derpy_upstream;
-
#proxy_pass http://localhost:8080;
-
#proxy_redirect off;
-
-
proxy_intercept_errors on;
-
error_page 502 /error_50x.html;
-
-
proxy_set_header Host $host:$server_port;
-
proxy_set_header X-Real-IP $remote_addr;
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-
-
#proxy_set_header Host 127.0.0.1:8080;
-
#proxy_set_header X-Real-IP 127.0.0.1;
-
#proxy_set_header X-Forwarded-For 127.0.0.1;
-
-
client_max_body_size 10m;
-
client_body_buffer_size 128k;
-
-
proxy_connect_timeout 90;
-
proxy_send_timeout 90;
-
proxy_read_timeout 90;
-
-
-
proxy_buffer_size 16k;
-
proxy_buffers 4 32k;
-
proxy_busy_buffers_size 64k;
-
proxy_temp_file_write_size 64k;
-
}
-
}
by Guest
by Guest
by Guest
by Guest
by Guest