Guest User

Untitled

a guest
Jul 27th, 2017
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2. listen 80 default_server;
  3. server_name mydomain.at 10.8.0.1;
  4.  
  5. root /var/www;
  6.  
  7. location ^~ /.well-known/acme-challenge {
  8. proxy_pass http://127.0.0.1:81;
  9. proxy_redirect off;
  10. }
  11. location / {
  12. # Enforce HTTPS
  13. #return 301 https://$server_addr$request_uri;
  14.  
  15. # Use this if you always want to redirect to the DynDNS address (no local access).
  16. return 301 https://$server_name$request_uri;
  17. }
  18. }
  19.  
  20. server {
  21. listen 443 ssl http2;
  22. server_name mydomain.at 10.8.0.1;
  23.  
  24. [... SSL Content ...]
  25.  
  26. location = / {
  27. # Disable access to the web root, otherwise nginx will show the default site here.
  28. deny all;
  29. }
  30.  
  31. location ^~ /owncloud {
  32. # Set max. size of a request (important for uploads to ownCloud)
  33. client_max_body_size 1G;
  34. # Besides the timeout values have to be raised in nginx' owncloud config, these values have to be raised for the proxy as well
  35. proxy_connect_timeout 300;
  36. proxy_send_timeout 300;
  37. proxy_read_timeout 300;
  38. send_timeout 300;
  39. proxy_set_header Host $host;
  40. proxy_set_header X-Real-IP $remote_addr;
  41. proxy_pass http://127.0.0.1:82;
  42. proxy_redirect off;
  43. }
  44. }
RAW Paste Data