Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2018
279
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <IfModule mod_headers.c>
  2. <IfModule mod_setenvif.c>
  3. <IfModule mod_fcgid.c>
  4. SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
  5. RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
  6. </IfModule>
  7. <IfModule mod_proxy_fcgi.c>
  8. SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1
  9. </IfModule>
  10. </IfModule>
  11.  
  12. <IfModule mod_env.c>
  13. # Add security and privacy related headers
  14. Header set X-Content-Type-Options "nosniff"
  15. Header set X-XSS-Protection "1; mode=block"
  16. Header set X-Robots-Tag "none"
  17. Header set X-Download-Options "noopen"
  18. Header set X-Permitted-Cross-Domain-Policies "none"
  19. SetEnv modHeadersAvailable true
  20. </IfModule>
  21.  
  22. # Add cache control for static resources
  23. <FilesMatch "\.(css|js|svg|gif)$">
  24. Header set Cache-Control "max-age=15778463"
  25. </FilesMatch>
  26.  
  27. # Let browsers cache WOFF files for a week
  28. <FilesMatch "\.woff$">
  29. Header set Cache-Control "max-age=604800"
  30. </FilesMatch>
  31. </IfModule>
  32. <IfModule mod_php5.c>
  33. php_value upload_max_filesize 1024M
  34. php_value post_max_size 511M
  35. php_value memory_limit 512M
  36. php_value mbstring.func_overload 0
  37. php_value always_populate_raw_post_data -1
  38. php_value default_charset 'UTF-8'
  39. php_value output_buffering 0
  40. <IfModule mod_env.c>
  41. SetEnv htaccessWorking true
  42. </IfModule>
  43. </IfModule>
  44. <IfModule mod_php7.c>
  45. php_value upload_max_filesize 1024M
  46. php_value post_max_size 511M
  47. php_value memory_limit 512M
  48. php_value mbstring.func_overload 0
  49. php_value default_charset 'UTF-8'
  50. php_value output_buffering 0
  51. <IfModule mod_env.c>
  52. SetEnv htaccessWorking true
  53. </IfModule>
  54. </IfModule>
  55. <IfModule mod_rewrite.c>
  56. RewriteEngine on
  57. RewriteCond %{HTTP_USER_AGENT} DavClnt
  58. RewriteRule ^$ /remote.php/webdav/ [L,R=302]
  59. RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  60. RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
  61. RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
  62. RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
  63. RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
  64. RewriteRule ^remote/(.*) remote.php [QSA,L]
  65. RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  66. RewriteCond %{REQUEST_URI} !^/.well-known/(acme-challenge|pki-validation)/.*
  67. RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
  68. </IfModule>
  69. <IfModule mod_mime.c>
  70. AddType image/svg+xml svg svgz
  71. AddEncoding gzip svgz
  72. </IfModule>
  73. <IfModule mod_dir.c>
  74. DirectoryIndex index.php index.html
  75. </IfModule>
  76. AddDefaultCharset utf-8
  77. Options -Indexes
  78. <IfModule pagespeed_module>
  79. ModPagespeed Off
  80. </IfModule>
  81. #### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####
  82.  
  83. ErrorDocument 403 /nextcloud/
  84. ErrorDocument 404 /nextcloud/
  85. <IfModule mod_rewrite.c>
  86. Options -MultiViews
  87. RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
  88. RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
  89. RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$
  90. RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$
  91. RewriteCond %{REQUEST_FILENAME} !core/img/manifest.json$
  92. RewriteCond %{REQUEST_FILENAME} !/remote.php
  93. RewriteCond %{REQUEST_FILENAME} !/public.php
  94. RewriteCond %{REQUEST_FILENAME} !/cron.php
  95. RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php
  96. RewriteCond %{REQUEST_FILENAME} !/status.php
  97. RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php
  98. RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php
  99. RewriteCond %{REQUEST_FILENAME} !/robots.txt
  100. RewriteCond %{REQUEST_FILENAME} !/updater/
  101. RewriteCond %{REQUEST_FILENAME} !/ocs-provider/
  102. RewriteCond %{REQUEST_URI} !^/.well-known/(acme-challenge|pki-validation)/.*
  103. RewriteRule . index.php [PT,E=PATH_INFO:$1]
  104. RewriteBase /nextcloud
  105. <IfModule mod_env.c>
  106. SetEnv front_controller_active true
  107. <IfModule mod_dir.c>
  108. DirectorySlash off
  109. </IfModule>
  110. </IfModule>
  111. </IfModule>
Advertisement
RAW Paste Data Copied
Advertisement