blob: 6d8232bf4e4a2ddd5d7312ef7525fe2df0c34395 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
map $http_user_agent $cli {
default 0;
~*wget 1;
~*curl 1;
}
server {
server_name up.chud.cyou;
root /var/www/up.chud.cyou;
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate ...;
ssl_certificate_key ...;
error_page 404 https://up.chud.cyou/chud/404;
location ~ /\.git {
deny all;
}
client_max_body_size 100m;
location ^~ /out/ {
autoindex on;
}
location = /upchud.tcl {
# include authorized;
# deny all;
include fastcgi_params;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_param SCRIPT_FILENAME /var/www/up.chud.cyou/upchud.tcl;
}
if ($cli) {
rewrite ^/.*$ /upchud.tcl last;
}
rewrite ^/$ /index.html last;
rewrite ^/upchud.tcl$ /upchud.tcl last;
rewrite ^/(.+)$ /out/$1;
}
|