Commit ad716b1b
Changed files (1)
config
config/nginx.conf
@@ -45,8 +45,23 @@ http {
}
}
server {
- listen 80 default;
- listen 443 ssl;
+ listen 80;
+ server_name staging.cakeside.com;
+ root /home/cakeside/apps/www.cakeside.com/current/public;
+ passenger_enabled on;
+ rails_env staging;
+ error_log /var/log/nginx/cakeside.error.log;
+ access_log off;
+
+ error_page 500 502 503 504 /50x.html;
+ location = /50x.html {
+ root html;
+ }
+ }
+
+ server {
+ listen 443;
+ ssl on;
ssl_certificate /home/cakeside/apps/www.cakeside.com/current/config/server.crt;
ssl_certificate_key /home/cakeside/apps/www.cakeside.com/current/config/server.key;
server_name staging.cakeside.com;
@@ -55,5 +70,12 @@ http {
rails_env staging;
error_log /var/log/nginx/cakeside.error.log;
access_log off;
+
+ proxy_set_header X_FORWARDED_PROTO https;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Url-Scheme $scheme;
+ proxy_redirect off;
+ proxy_max_temp_file_size 0;
}
}