treebird/docs/sample/treebird.nginx.conf
nekobit 8bd187bece Fix nginx config sample
FossilOrigin-Name: 7db96f289c477805f18cf4d0d79c3f14bd6f55b80ef4cc37f74c8b30207903a1
2022-06-08 23:18:27 +00:00

35 lines
1.1 KiB
Plaintext

server {
server_name treebird.example.com;
location @treebird {
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;
include fastcgi.conf; #Check your nginx installation for fastcgi.conf or fastcgi_param
}
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;
}