Advertisement
Guest User

gds_cloud

a guest
Feb 12th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. upstream php-handler {
  2. server 127.0.0.1:9000;
  3. #server unix:/var/run/php5-fpm.sock;
  4. }
  5. server {
  6. listen 80;
  7. server_name 192.168.1.116;
  8. return 301 https://$server_name$request_uri; # enforce https
  9. }
  10.  
  11. server {
  12. listen 443 ssl;
  13. server_name 192.168.1.116;
  14. ssl_certificate /etc/nginx/cert.pem;
  15. ssl_certificate_key /etc/nginx/cert.key;
  16. # Path to the root of your installation
  17. root /var/www/owncloud;
  18. client_max_body_size 1000M; # set max upload size
  19. fastcgi_buffers 64 4K;
  20. rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect;
  21. rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect;
  22. rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect;
  23. index index.php;
  24. error_page 403 /core/templates/403.php;
  25. error_page 404 /core/templates/404.php;
  26. location = /robots.txt {
  27. allow all;
  28. log_not_found off;
  29. access_log off;
  30. }
  31. location ~ ^/(?:\.htaccess|data|config|db_structure\.xml|README) {
  32. deny all;
  33. }
  34. location / {
  35. # The following 2 rules are only needed with webfinger
  36. rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
  37. rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;
  38. rewrite ^/.well-known/carddav /remote.php/carddav/ redirect;
  39. rewrite ^/.well-known/caldav /remote.php/caldav/ redirect;
  40. rewrite ^(/core/doc/[^\/]+/)$ $1/index.html;
  41. try_files $uri $uri/ index.php;
  42. }
  43. location ~ \.php(?:$|/) {
  44. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  45. include fastcgi_params;
  46. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  47. fastcgi_param PATH_INFO $fastcgi_path_info;
  48. fastcgi_param HTTPS on;
  49. fastcgi_pass php-handler;
  50. }
  51. # Optional: set long EXPIRES header on static assets
  52. location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
  53. expires 30d;
  54. # Optional: Don't log access to assets
  55. access_log off;
  56. }
  57. }
  58. GDSDIOGOCLOUD
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement