Skip to content

Instantly share code, notes, and snippets.

@D3xx73r
Created December 31, 2013 00:32
Show Gist options
  • Save D3xx73r/8190524 to your computer and use it in GitHub Desktop.
Save D3xx73r/8190524 to your computer and use it in GitHub Desktop.
Configure canvas lms with Nginx
#Nginx configuration file for Canvas LMS
server {
listen 80;
server_name canvas.yourserver.com files.canvas.yourserver.com;
root /path/to/public;
rails_env production; #optionaly specify the rails environment
location / {
rewrite ^(.*)$ https://$http_host$request_uri redirect;
}
location /path/to/public {
allow all;
}
passenger_enabled on;
passenger_ruby path/to/your/ruby/interpreter;
}
#configure SSL for canvas
server {
listen 443;
ssl on;
ssl_certificate /path/to/your/pem/file;
ssl_certificate_key /path/to/your/key/file;
rails_env production; # optionally specify the rails environment
server_name canvas.yourserver.com files.canvas.yourserver.com;
root /path/to/public;
location /path/to/public {
allow all;
}
keepalive_timeout 70;
passenger_enabled on;
passenger_ruby /path/to/your/ruby/interpreter;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment