54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
server {
|
|
listen 443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
server_name canvas.libraryofcode.org;
|
|
|
|
ssl_certificate /etc/letsencrypt/live/libraryofcode.org/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/libraryofcode.org/privkey.pem;
|
|
|
|
root /opt/canvas/public;
|
|
index index.html;
|
|
|
|
passenger_enabled on;
|
|
passenger_app_env production;
|
|
passenger_ruby /usr/local/bin/ruby;
|
|
passenger_user canvas;
|
|
passenger_group root;
|
|
passenger_friendly_error_pages on;
|
|
# passenger_root /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini;
|
|
|
|
#passenger_pool_idle_time 300;
|
|
#passenger_max_pool_size 10;
|
|
|
|
client_max_body_size 50M;
|
|
|
|
# Serve the static login discovery page at /login-discovery
|
|
location = /login-discovery {
|
|
default_type text/html;
|
|
alias /var/www/html/canvas-login-discovery.html;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri @app;
|
|
}
|
|
|
|
location @app {
|
|
passenger_enabled on;
|
|
}
|
|
|
|
location /assets/ {
|
|
expires max;
|
|
add_header Cache-Control public;
|
|
}
|
|
|
|
location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg|otf)$ {
|
|
expires max;
|
|
add_header Cache-Control public;
|
|
}
|
|
|
|
location /health_check {
|
|
access_log off;
|
|
return 200 "OK\n";
|
|
}
|
|
}
|