mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
38 lines
922 B
Nginx Configuration File
38 lines
922 B
Nginx Configuration File
upstream unicorn {
|
|
server unix:/tmp/unicorn.fabmanager.sock fail_timeout=0;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name fab-manager.com www.fab-manager.com
|
|
rewrite ^ https://www.fab-manager.com$request_uri? permanent;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
server_name fab-manager.com www.fab-manager.com;
|
|
root /home/admin/apps/fabmanager/current/public;
|
|
|
|
ssl on;
|
|
ssl_certificate /etc/nginx/ssl/certificate.fab-manager.com.crt;
|
|
ssl_certificate_key /etc/nginx/ssl/fab-manager.com.deprotected.key;
|
|
|
|
location ^~ /assets/ {
|
|
gzip_static on;
|
|
expires max;
|
|
add_header Cache-Control public;
|
|
}
|
|
|
|
try_files $uri/index.html $uri @unicorn;
|
|
location @unicorn {
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Host $http_host;
|
|
proxy_redirect off;
|
|
proxy_pass http://unicorn;
|
|
}
|
|
|
|
error_page 500 502 503 504 /500.html;
|
|
client_max_body_size 4G;
|
|
keepalive_timeout 10;
|
|
}
|