# 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; return 301 https://$host$request_uri; } ### 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 / { #blocks blank user_agents if ($http_user_agent = "") { return 301 $scheme://www.google.com/; } proxy_set_header Host $host; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Accept-Encoding ""; proxy_set_header Proxy ""; proxy_pass_request_headers on; proxy_pass http://freehand; proxy_redirect off; proxy_connect_timeout 300; proxy_send_timeout 300; proxy_read_timeout 300; } 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 301 https://$host$request_uri; } ### 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 / { #blocks blank user_agents if ($http_user_agent = "") { return 301 $scheme://www.google.com/; } 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; } }