diff options
| author | Emil Williams | 2025-07-06 18:36:26 +0000 |
|---|---|---|
| committer | Emil Williams | 2025-07-06 18:36:26 +0000 |
| commit | a9c95145e8b3d9a46a4597e4c4c5d4ac77ad18db (patch) | |
| tree | f2854e0b06f1222bd88c5268f2849b01abc52b69 /up.chud.cyou | |
| parent | be96ef3c69aa497dd0a663de6cc3318fa7d77893 (diff) | |
| download | emil-up.chud.cyou-a9c95145e8b3d9a46a4597e4c4c5d4ac77ad18db.tar.xz emil-up.chud.cyou-a9c95145e8b3d9a46a4597e4c4c5d4ac77ad18db.tar.zst | |
nginx, in deployment
Diffstat (limited to 'up.chud.cyou')
| -rw-r--r-- | up.chud.cyou | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/up.chud.cyou b/up.chud.cyou new file mode 100644 index 0000000..6d8232b --- /dev/null +++ b/up.chud.cyou @@ -0,0 +1,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; +} |
