treebird/docs/sample/treebird.nginx.conf
me@ow.nekobit.net ce3ee07ef0 [PATCH] Sam Therapy: Fix documentation
FossilOrigin-Name: c16f8d24cc29da143040ea31ba49c4d72721e3317f2c542106c497b3101a65d7
2022-03-29 14:39:09 +00:00

38 lines
No EOL
1,017 B
Text

server {
server_name treebird.example.com;
location @treebird {
include fastcgi.conf; #Check your nginx installation for fastcgi.conf or fastcgi_param
fastcgi_param SCRIPT_FILENAME /usr/local/bin/treebird; # change this to the location of your treebird executable
fastcgi_param PATH_INFO $uri;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
}
location / {
root /usr/local/share/treebird; #Change this to the location of the static files
try_files $uri @treebird;
}
listen [::]:443 ssl;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/treebird.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/treebird.example.com/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
if ($host = treebird.example.com) {
return 301 https://$host$request_uri;
}
listen 80;
listen [::]:80;
server_name treebird.example.com;
return 404;
}