nginx_piratebox.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # PirateBox app for YunoHost
  2. # Copyright (C) 2015 Julien Vaubourg <julien@vaubourg.com>
  3. # Contribute at https://github.com/jvaubourg/piratebox_ynh
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU Affero General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU Affero General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. server {
  18. listen 4280 default_server;
  19. listen [::]:4280 default_server;
  20. if ($host != '<TPL:DOMAIN>') {
  21. rewrite ^ http://<TPL:DOMAIN><TPL:URL_PATH>;
  22. }
  23. location ~ {
  24. proxy_pass http://127.0.0.1:80;
  25. proxy_set_header Host $host;
  26. proxy_set_header X-Real-IP $remote_addr;
  27. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  28. proxy_connect_timeout 90;
  29. proxy_send_timeout 600;
  30. proxy_read_timeout 600;
  31. proxy_buffers 32 4k;
  32. client_max_body_size 10G;
  33. }
  34. access_log /dev/null;
  35. error_log /dev/null;
  36. }