Advertisement
alpa_s

Untitled

Feb 8th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2. listen 80;
  3.  
  4. root /home/brand/a.brand.ad/frontend/web/;
  5. index index.php index.html;
  6.  
  7. server_name a.branding.ad;
  8.  
  9. client_max_body_size 32m;
  10. charset utf-8;
  11.  
  12. location / {
  13. # Redirect everything that isn't a real file to index.php
  14. try_files $uri $uri/ /index.php$is_args$args;
  15. }
  16.  
  17. location ~ ^/assets/.*\.php$ {
  18. deny all;
  19. }
  20.  
  21.  
  22. location ~ \.php$ {
  23. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  24. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  25. fastcgi_pass php-fpm;
  26. fastcgi_index index.php;
  27. include fastcgi_params;
  28. }
  29.  
  30. location ~* /\. {
  31. deny all;
  32. }
  33. }
  34.  
  35. server {
  36. listen 80;
  37.  
  38. root /home/brand/a.brand.ad/backend/web;
  39. index index.php index.html;
  40.  
  41. server_name a.brand.ad;
  42.  
  43.  
  44. client_max_body_size 32m;
  45. charset utf-8;
  46.  
  47.  
  48. location / {
  49. # Redirect everything that isn't a real file to index.php
  50. try_files $uri $uri/ /index.php$is_args$args;
  51. }
  52.  
  53.  
  54. location ~ ^/assets/.*\.php$ {
  55. deny all;
  56. }
  57.  
  58.  
  59. location ~ \.php$ {
  60. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  61. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  62. fastcgi_pass php-fpm;
  63. fastcgi_index index.php;
  64. include fastcgi_params;
  65. try_files $uri =404;
  66. }
  67.  
  68. location ~* /\. {
  69. deny all;
  70. }
  71. }
  72.  
  73. server {
  74. listen 80;
  75.  
  76. root /home/brand/a.brand.ad/storage/web;
  77. index index.php index.html;
  78.  
  79. server_name storage.a.brand.ad;
  80.  
  81. client_max_body_size 32m;
  82. charset utf-8;
  83.  
  84. location / {
  85. # Redirect everything that isn't a real file to index.php
  86. try_files $uri $uri/ /index.php$is_args$args;
  87. }
  88.  
  89.  
  90. location ~ ^/assets/.*\.php$ {
  91. deny all;
  92. }
  93.  
  94.  
  95. location ~ \.php$ {
  96. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  97. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  98. fastcgi_pass php-fpm;
  99. fastcgi_index index.php;
  100. include fastcgi_params;
  101. try_files $uri =404;
  102. }
  103.  
  104. location ~* /\. {
  105. deny all;
  106. }
  107. }
  108.  
  109.  
  110. ## PHP-FPM Servers ##
  111. upstream php-fpm {
  112. server unix:/var/run/php/php7.0-fpm.sock;
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement