Guest User

Untitled

a guest
Aug 20th, 2019
65
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. set $MAGE_ROOT /Users/danielvandervelden/workspace/eki-dev;
  2.  
  3. index index.php;
  4. autoindex off;
  5. charset UTF-8;
  6. error_page 404 403 = /errors/404.php;
  7. #add_header "X-UA-Compatible" "IE=Edge";
  8.  
  9. # PHP entry point for setup application
  10. location ~* ^/setup($|/) {
  11. root $MAGE_ROOT;
  12. location ~ ^/setup/index.php {
  13. fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
  14. fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=600";
  15. fastcgi_read_timeout 600s;
  16. fastcgi_connect_timeout 600s;
  17.  
  18. fastcgi_index index.php;
  19. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  20. }
  21.  
  22. location ~ ^/setup/(?!pub/). {
  23. deny all;
  24. }
  25.  
  26. location ~ ^/setup/pub/ {
  27. add_header X-Frame-Options "SAMEORIGIN";
  28. }
  29. }
  30.  
  31. # PHP entry point for update application
  32. location ~* ^/update($|/) {
  33. root $MAGE_ROOT;
  34.  
  35. location ~ ^/update/index.php {
  36. fastcgi_split_path_info ^(/update/index.php)(/.+)$;
  37. fastcgi_index index.php;
  38. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  39. fastcgi_param PATH_INFO $fastcgi_path_info;
  40. }
  41.  
  42. # Deny everything but index.php
  43. location ~ ^/update/(?!pub/). {
  44. deny all;
  45. }
  46.  
  47. location ~ ^/update/pub/ {
  48. add_header X-Frame-Options "SAMEORIGIN";
  49. }
  50. }
  51.  
  52. #location / {
  53. # try_files $uri $uri/ /index.php$is_args$args;
  54. #}
  55.  
  56. location /pub/ {
  57. location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*\.xml) {
  58. deny all;
  59. }
  60. alias $MAGE_ROOT/pub/;
  61. add_header X-Frame-Options "SAMEORIGIN";
  62. }
  63.  
  64. location /static/ {
  65. # Uncomment the following line in production mode
  66. # expires max;
  67.  
  68. # Remove signature of the static files that is used to overcome the browser cache
  69. location ~ ^/static/version {
  70. rewrite ^/static/(version[^/]+/)?(.*)$ /static/$2 last;
  71. }
  72.  
  73. location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2|json)$ {
  74. add_header Cache-Control "public";
  75. add_header X-Frame-Options "SAMEORIGIN";
  76. expires +1y;
  77.  
  78. if (!-f $request_filename) {
  79. rewrite ^/static/?(.*)$ /static.php?resource=$1 last;
  80. }
  81. }
  82. location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
  83. add_header Cache-Control "no-store";
  84. add_header X-Frame-Options "SAMEORIGIN";
  85. expires off;
  86.  
  87. if (!-f $request_filename) {
  88. rewrite ^/static/?(.*)$ /static.php?resource=$1 last;
  89. }
  90. }
  91. if (!-f $request_filename) {
  92. rewrite ^/static/?(.*)$ /static.php?resource=$1 last;
  93. }
  94. add_header X-Frame-Options "SAMEORIGIN";
  95. }
  96.  
  97. location /media/ {
  98. try_files $uri $uri/ /get.php$is_args$args;
  99.  
  100. location ~ ^/media/theme_customization/.*\.xml {
  101. deny all;
  102. }
  103.  
  104. location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
  105. add_header Cache-Control "public";
  106. add_header X-Frame-Options "SAMEORIGIN";
  107. expires +1y;
  108. try_files $uri $uri/ /get.php$is_args$args;
  109. }
  110. location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
  111. add_header Cache-Control "no-store";
  112. add_header X-Frame-Options "SAMEORIGIN";
  113. expires off;
  114. try_files $uri $uri/ /get.php$is_args$args;
  115. }
  116. add_header X-Frame-Options "SAMEORIGIN";
  117. }
  118.  
  119. location /media/customer/ {
  120. deny all;
  121. }
  122.  
  123. location /media/downloadable/ {
  124. deny all;
  125. }
  126.  
  127. location /media/import/ {
  128. deny all;
  129. }
  130.  
  131. # PHP entry point for main application
  132. location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check)\.php$ {
  133. try_files $uri =404;
  134. fastcgi_buffers 1024 4k;
  135.  
  136. fastcgi_param PHP_FLAG "session.auto_start=off \n suhosin.session.cryptua=off";
  137. fastcgi_param PHP_VALUE "memory_limit=756M \n max_execution_time=18000";
  138. fastcgi_read_timeout 600s;
  139. fastcgi_connect_timeout 600s;
  140.  
  141. fastcgi_index index.php;
  142. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  143. }
  144.  
  145. gzip on;
  146. gzip_disable "msie6";
  147.  
  148. gzip_comp_level 6;
  149. gzip_min_length 1100;
  150. gzip_buffers 16 8k;
  151. gzip_proxied any;
  152. gzip_types
  153. text/plain
  154. text/css
  155. text/js
  156. text/xml
  157. text/javascript
  158. application/javascript
  159. application/x-javascript
  160. application/json
  161. application/xml
  162. application/xml+rss
  163. image/svg+xml;
  164. gzip_vary on;
  165.  
  166. # Banned locations (only reached if the earlier PHP entry point regexes don't match)
  167. location ~* (\.php$|\.htaccess$|\.git) {
  168. deny all;
  169. }
RAW Paste Data