You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # Upstream sites for proxy-ing
  2. upstream craft {
  3. server 138.68.233.29:8080;
  4. }
  5. upstream freehand {
  6. server 138.68.233.29:8082;
  7. }
  8. ### FREEHAND ###
  9. server {
  10. listen 80;
  11. listen [::]:80;
  12. server_name freehand.com www.freehand.com;
  13. return 301 https://$host$request_uri;
  14. }
  15. ### SSL Stuff
  16. server {
  17. listen 443 ssl http2;
  18. listen [::]:443 ssl http2;
  19. server_name freehand.com www.freehand.com;
  20. include snippets/letsencrypt-freehand.conf;
  21. include snippets/ssl-params-freehand.conf;
  22. root /var/www/html;
  23. index index.html index.htm index.php index.nginx-debian.html;
  24. location / {
  25. #blocks blank user_agents
  26. if ($http_user_agent = "") { return 301 $scheme://www.google.com/; }
  27. proxy_set_header Host $host;
  28. proxy_set_header X-Forwarded-Host $host;
  29. proxy_set_header X-Forwarded-Server $host;
  30. proxy_set_header X-Forwarded-Proto $scheme;
  31. proxy_set_header X-Real-IP $remote_addr;
  32. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  33. proxy_set_header Accept-Encoding "";
  34. proxy_set_header Proxy "";
  35. proxy_pass_request_headers on;
  36. proxy_pass http://freehand;
  37. proxy_redirect off;
  38. proxy_connect_timeout 300;
  39. proxy_send_timeout 300;
  40. proxy_read_timeout 300;
  41. }
  42. location ~/\.ht {
  43. deny all;
  44. }
  45. }
  46. ### CRAFT IN AMERICA ###
  47. ### Redirect regular traffic to SSL
  48. server {
  49. listen 80;
  50. listen [::]:80;
  51. server_name craftinamerica.org www.craftinamerica.org;
  52. return 301 https://$host$request_uri;
  53. }
  54. ### SSL Stuff
  55. server {
  56. listen 443 ssl http2;
  57. listen [::]:443 ssl http2;
  58. server_name craftinamerica.org www.craftinamerica.org;
  59. include snippets/letsencrypt.conf;
  60. include snippets/ssl-params.conf;
  61. root /var/www/html;
  62. index index.html index.htm index.php index.nginx-debian.html;
  63. location / {
  64. #blocks blank user_agents
  65. if ($http_user_agent = "") { return 301 $scheme://www.google.com/; }
  66. proxy_set_header Host $host;
  67. proxy_set_header X-Real-IP $remote_addr;
  68. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  69. proxy_set_header X-Forwarded-Proto $scheme;
  70. proxy_set_header Accept-Encoding "";
  71. proxy_set_header Proxy "";
  72. proxy_pass http://craft;
  73. proxy_redirect off;
  74. }
  75. location ~/\.ht {
  76. deny all;
  77. }
  78. }