forked from wppurking/ember-rc
/
nginx.conf
49 lines (38 loc) · 1.26 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
## Nginx Production Https Ember Server Configuration
## https site##
server {
listen 80 default;
server_name localhost;
#root /usr/share/nginx/html;
root /dist;
index index.html index.htm;
# log files
access_log /var/log/nginx/localhost.access.log;
error_log /var/log/nginx/localhost.error.log;
# ssl files
#ssl on;
keepalive_timeout 60;
# include information on SSL keys, cert, protocols and ciphers
# SSLLabs.com is a great resource for this, along with testing
# your SSL configuration: https://www.ssllabs.com/projects/documentation/
# proxy buffers
proxy_buffers 16 64k;
proxy_buffer_size 128k;
# gzip
gzip on;
gzip_http_version 1.0;
gzip_disable "MSIE [1-6].";
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
## default location ##
location / {
try_files $uri $uri/ /index.html?/$request_uri;
}
}
## http redirects to https ##
server {
listen 443;
server_name localhost;
# Strict Transport Security
add_header Strict-Transport-Security max-age=2592000;
rewrite ^/.*$ http://$host$request_uri? permanent;
}