/
advabest.production
90 lines (77 loc) · 3.04 KB
/
advabest.production
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
server {
listen 80;
server_name advabest.com;
#server_name *.ds87-230-55-112.dedicated.hosteurope.de;
access_log /home/application/projects/advabest/production/shared/log/nginx_access.log;
root /home/application/projects/advabest/production/current/public;
index index.html index.htm;
# auth_basic "Production";
# auth_basic_user_file staging.sk.htpasswd;
# passenger stuff
passenger_enabled on;
rails_env production;
rails_spawn_method smart-lv2;
rails_framework_spawner_idle_time 1800;
rails_app_spawner_idle_time 600;
# For the app maintenance
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html break;
return 503;
}
}
server { server_name www.advabest.de; rewrite ^ http://www.advabest.com/de/; }
server { server_name www.advabest.at; rewrite ^ http://www.advabest.com/de/; }
server {
listen 443;
server_name advabest.com;
#server_name *.ds87-230-55-112.dedicated.hosteurope.de;
access_log /home/application/projects/advabest/production/shared/log/nginx_access.log;
root /home/application/projects/advabest/production/current/public;
index index.html index.htm;
# auth_basic "Production";
# auth_basic_user_file staging.sk.htpasswd;
# passenger stuff
passenger_enabled on;
rails_env production;
rails_spawn_method smart-lv2;
rails_framework_spawner_idle_time 1800;
rails_app_spawner_idle_time 600;
ssl on;
ssl_certificate /home/application/certs/advabest.com.crt;
ssl_certificate_key /home/application/certs/advabest.com.key;
location ~* ^/(javascripts|stylesheets|images/layout|images/colorbox|digital_contents) {
expires max;
}
location /data/pricelists {
root /home/application/projects/s_k/staging/shared;
internal;
}
# For the app maintenance
if (-f $document_root/system/maintenance.html) {
rewrite ^(.*)$ /system/maintenance.html break;
}
}
## Basic authentication can be created for SAAS customers by
## doing something similar to the following.
#server {
# server_name intranet.advabest.com;
# access_log /home/application/projects/advabest/production/shared/log/nginx_access.log;
# root /home/application/projects/advabest/production/current/public;
# index index.html index.htm;
# auth_basic "Production";
# auth_basic_user_file staging.sk.htpasswd;
#
# # passenger stuff
# passenger_enabled on;
# rails_env production;
# rails_spawn_method smart-lv2;
# rails_framework_spawner_idle_time 1800;
# rails_app_spawner_idle_time 600;
#
# # For the app maintenance
# if (-f $document_root/system/maintenance.html) {
# rewrite ^(.*)$ /system/maintenance.html break;
# return 503;
# }
#}
#}