Skip to content

Instantly share code, notes, and snippets.

@beglov
Created August 18, 2020 13:28
Show Gist options
  • Save beglov/f7963f0c67866e29487c681cf8a4bfcd to your computer and use it in GitHub Desktop.
Save beglov/f7963f0c67866e29487c681cf8a4bfcd to your computer and use it in GitHub Desktop.
Nginx config for rails app with Passenger
server {
listen 80;
listen [::]:80;
server_name ec2-3-134-77-212.us-east-2.compute.amazonaws.com;
root /home/deploy/tms/current/public;
access_log /home/deploy/tms/current/log/nginx.access.log;
error_log /home/deploy/tms/current/log/nginx.error.log info;
client_max_body_size 20M;
passenger_enabled on;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment