upstream backend { # ip_hash; server 10.132.24.204; } upstream frontend { server 10.132.24.204; server 10.132.7.238; } server { root /var/www/kinderup.com/public/; index index.php index.html; server_name kinderup.com; charset utf-8; # proxy_set_header Host $http_host; location ~* \.(?:manifest|appcache|html?|xml|json)$ { expires -1; } location ~* \.(?:rss|atom)$ { expires 1h; add_header Cache-Control "public"; } location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { expires 1M; add_header Cache-Control "public"; } location ~* \.(?:css|js)$ { expires 1y; add_header Cache-Control "public"; } location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ { expires 1M; add_header Cache-Control "public"; } location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_intercept_errors on; } listen [::]:443 ssl ipv6only=on; # managed by Certbot listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/kinderup.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/kinderup.com/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { listen 443; listen [::]:443; root /var/www/kinderup.com/public/; index index.php index.html; server_name kinderup.com; charset utf-8; location ~* \.(?:manifest|appcache|html?|xml|json)$ { expires -1; } location ~* \.(?:rss|atom)$ { expires 1h; add_header Cache-Control "public"; } location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { expires 1M; add_header Cache-Control "public"; } location ~* \.(?:css|js)$ { expires 1y; add_header Cache-Control "public"; } location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ { expires 1M; add_header Cache-Control "public"; } location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_intercept_errors on; } } server { if ($host = kinderup.com) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; listen [::]:80; server_name kinderup.com; return 404; # managed by Certbot }