This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
listen [::]:80; | |
server_name your_domain.com www.your_domain.com; | |
root /var/www/html/app_name/public; | |
passenger_enabled on; | |
passenger_app_env production; | |
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | |
expires 744h; | |
log_not_found off; | |
add_header Pragma public; | |
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name your_domain.com www.your_domain.com; | |
root /var/www/html/app_name/public; | |
passenger_enabled on; | |
passenger_app_env production; | |
ssl_certificate /etc/letsencrypt/live/your_domain.com/fullchain.pem; # managed by Certbot | |
ssl_certificate_key /etc/letsencrypt/live/your_domain.com/privkey.pem; # managed by Certbot | |
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot | |
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { | |
expires 744h; | |
log_not_found off; | |
add_header Pragma public; | |
add_header Cache-Control "public, must-revalidate, proxy-revalidate"; | |
} | |
} |