Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jschwindt/4ee8224471c1ac7d94dbf57aefe0f698 to your computer and use it in GitHub Desktop.
Save jschwindt/4ee8224471c1ac7d94dbf57aefe0f698 to your computer and use it in GitHub Desktop.
server {
client_max_body_size 30M;
server_name sistema.example.com.ar;
# ~2 seconds is often enough for most folks to parse HTML/CSS and
# retrieve needed images/icons/frames, connections are cheap in
# nginx so increasing this is generally safe...
keepalive_timeout 5;
# path for static files
root /var/www/sistema.example.com.ar/current/public;
access_log /var/log/nginx/example.access.log;
error_log /var/log/nginx/example.error.log warn;
passenger_enabled on;
passenger_min_instances 4;
# Rails error pages
error_page 500 502 503 504 /500.html;
location = /500.html {
root /var/www/sistema.example.com.ar/current/public;
}
location ~ ^/(assets|packs)/ {
root /var/www/sistema.example.com.ar/current/public;
gzip_static on; # to serve pre-gzipped version
expires max;
add_header Cache-Control public;
}
listen 443 ssl http2; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/sistema.example.com.ar/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/sistema.example.com.ar/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
passenger_pre_start http://sistema.example.com.ar/;
server {
if ($host = sistema.example.com.ar) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name sistema.example.com.ar;
return 404; # managed by Certbot
}
@sliverstar-kk
Copy link

hello,would you do me a favor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment