|
|
|
@ -3,7 +3,7 @@ server { |
|
|
|
listen 80; |
|
|
|
server_name ikea-foundation-week-2025.onc.dk; |
|
|
|
|
|
|
|
root /home/ikea_foundation/week_2025/public; |
|
|
|
root /home/ikea_foundation_2025/week_2025/public; |
|
|
|
|
|
|
|
# Lets encrypt |
|
|
|
location ~ /.well-known { |
|
|
|
@ -41,7 +41,7 @@ server { |
|
|
|
# listen 80; |
|
|
|
# server_name spotlinks.ikeafoundation.org; |
|
|
|
# |
|
|
|
# root /home/ikea_foundation/week_2025/public; |
|
|
|
# root /home/ikea_foundation_2025/week_2025/public; |
|
|
|
# |
|
|
|
# # Lets encrypt |
|
|
|
# location ~ /.well-known { |
|
|
|
@ -54,8 +54,8 @@ server { |
|
|
|
# } |
|
|
|
|
|
|
|
# Puma |
|
|
|
upstream puma_ikea { |
|
|
|
server unix:///home/ikea_foundation/week_2025/tmp/pids/puma.sock fail_timeout=0; |
|
|
|
upstream puma_ikea_25 { |
|
|
|
server unix:///home/ikea_foundation_2025/week_2025/tmp/pids/puma.sock fail_timeout=0; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -80,24 +80,24 @@ server { |
|
|
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot |
|
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot |
|
|
|
|
|
|
|
access_log /home/ikea_foundation/week_2025/log/httpd-access.log; |
|
|
|
error_log /home/ikea_foundation/week_2025/log/httpd-errors.log; |
|
|
|
access_log /home/ikea_foundation_2025/week_2025/log/httpd-access.log; |
|
|
|
error_log /home/ikea_foundation_2025/week_2025/log/httpd-errors.log; |
|
|
|
|
|
|
|
root /home/ikea_foundation/week_2025/public; |
|
|
|
root /home/ikea_foundation_2025/week_2025/public; |
|
|
|
|
|
|
|
# App server |
|
|
|
location @puma_ikea { |
|
|
|
location @puma_ikea_25 { |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
proxy_set_header Host $http_host; |
|
|
|
proxy_set_header X-Forwarded_Proto $scheme; |
|
|
|
proxy_redirect off; |
|
|
|
|
|
|
|
proxy_pass http://puma_ikea; |
|
|
|
proxy_pass http://puma_ikea_25; |
|
|
|
} |
|
|
|
|
|
|
|
# Serve static (compiled) assets directly if they exist (for rails production) |
|
|
|
location ~ ^/(assets|packs|static)/ { |
|
|
|
try_files $uri @puma_ikea; |
|
|
|
try_files $uri @puma_ikea_25; |
|
|
|
|
|
|
|
access_log off; |
|
|
|
gzip_static on; |
|
|
|
@ -114,7 +114,7 @@ server { |
|
|
|
} |
|
|
|
|
|
|
|
# location /cable { |
|
|
|
# proxy_pass http://puma_ikea; |
|
|
|
# proxy_pass http://puma_ikea_25; |
|
|
|
# proxy_http_version 1.1; |
|
|
|
# proxy_set_header Upgrade $http_upgrade; |
|
|
|
# proxy_set_header Connection 'upgrade'; |
|
|
|
@ -122,13 +122,13 @@ server { |
|
|
|
|
|
|
|
# Send non-static file requests to the app server |
|
|
|
location / { |
|
|
|
try_files $uri @puma_ikea; |
|
|
|
try_files $uri @puma_ikea_25; |
|
|
|
} |
|
|
|
|
|
|
|
# You can override error pages by redirecting the requests to a file in your |
|
|
|
# application's public folder, if you so desire: |
|
|
|
error_page 500 502 503 504 /500.html; |
|
|
|
location = /500.html { |
|
|
|
root /home/ikea_foundation/week_2025/public; |
|
|
|
root /home/ikea_foundation_2025/week_2025/public; |
|
|
|
} |
|
|
|
} |