# Upstream sites for proxy-ing upstream craft { server 138.68.233.29:8080; } upstream freehand { server 138.68.233.29:8082; } ### FREEHAND ### server { listen 80; listen [::]:80; server_name freehand.com www.freehand.com; index index.html index.html index.php; location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://freehand; proxy_redirect off; } } ### SSL Stuff server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name freehand.com www.freehand.com; include snippets/letsencrypt-freehand.conf; include snippets/ssl-params-freehand.conf; root /var/www/html; index index.html index.htm index.php index.nginx-debian.html; location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Accept-Encoding ""; proxy_set_header Proxy ""; proxy_pass http://freehand; proxy_redirect off; } location ~/\.ht { deny all; } } ### CRAFT IN AMERICA ### ### Redirect regular traffic to SSL server { listen 80; listen [::]:80; server_name craftinamerica.org www.craftinamerica.org; # return 302 https://$host$request_uri; # WP index index.html index.htm index.php index.nginx-debian.html; location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://craft; proxy_redirect off; } } ### SSL Stuff server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name craftinamerica.org www.craftinamerica.org; include snippets/letsencrypt.conf; include snippets/ssl-params.conf; root /var/www/html; index index.html index.htm index.php index.nginx-debian.html; location / { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Accept-Encoding ""; proxy_set_header Proxy ""; proxy_pass http://craft; proxy_redirect off; } location ~/\.ht { deny all; } }