Skip to content

Instantly share code, notes, and snippets.

@Bishwas-py
Created July 21, 2022 06:35
Show Gist options
  • Save Bishwas-py/1a9459ae5279f6e6ec88a65f66381502 to your computer and use it in GitHub Desktop.
Save Bishwas-py/1a9459ae5279f6e6ec88a65f66381502 to your computer and use it in GitHub Desktop.
Nginx Setup for Rails app
server {
listen 80;
listen [::]:80;
server_name _;
root /home/username/rails-app-name/public;
passenger_enabled on;
passenger_app_env production;
location /cable {
passenger_app_group_name deviser-club_websocket;
passenger_force_max_concurrent_requests_per_process 0;
}
# Allow uploads up to 100MB in size
client_max_body_size 100m;
location ~ ^/(assets|packs) {
expires max;
gzip_static on;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment