darkfi.nginx 789 B

12345678910111213141516171819202122232425262728293031
  1. server {
  2. listen 80;
  3. server_name <url>;
  4. root <path/to/website>;
  5. access_log </path/to/log>/darkfi-webshop.access.log;
  6. error_log </path/to/log>/darkfi-webshop.error.log;
  7. location / {
  8. proxy_pass http://127.0.0.1:<port>;
  9. proxy_http_version 1.1;
  10. proxy_set_header Host $http_host;
  11. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  12. proxy_set_header X-Forwarded-Proto $scheme;
  13. proxy_set_header Upgrade $http_upgrade;
  14. proxy_redirect off;
  15. proxy_buffering off;
  16. proxy_set_header X-Real-IP $remote_addr;
  17. proxy_set_header X-Forwarded-Host $server_name;
  18. }
  19. # cache resources under /static
  20. location ~* \.(png|jpg|jpeg|gif|svg|ico|woff|woff2|css|js)$ {
  21. expires 1y;
  22. add_header Cache-Control "public, no-transform";
  23. }
  24. }