Guest User

Untitled

a guest
Jun 22nd, 2017
161
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2. listen 80;
  3.  
  4. server_name shopscript.local;
  5.  
  6. root /var/www/html/shopscript.local/public;
  7. index index.php;
  8.  
  9. try_files $uri $uri/ /index.php?$args;
  10.  
  11. location /index.php {
  12. include snippets/fastcgi-php.conf;
  13. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  14. }
  15.  
  16. # for install only
  17. location /install.php {
  18. include snippets/fastcgi-php.conf;
  19. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  20. }
  21.  
  22. location /api.php {
  23. fastcgi_split_path_info ^(.+\.php)(.*)$;
  24. include snippets/fastcgi-php.conf;
  25. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  26. }
  27.  
  28. location ^~ /wa-data/protected/ {
  29. #return 403;
  30. #X-Accel-Redirect
  31. internal;
  32. }
  33.  
  34. location ~* ^/wa-(log|config|cache|system)/ {
  35. return 403;
  36. }
  37.  
  38. location ~* ^/wa-data/public/contacts/photos/[0-9]+/ {
  39. root /var/www/fw/;
  40. access_log off;
  41. expires 30d;
  42. error_page 404 = @contacts_thumb;
  43. }
  44.  
  45. location @contacts_thumb {
  46. include snippets/fastcgi-php.conf;
  47. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  48. fastcgi_param SCRIPT_NAME /wa-data/public/contacts/photos/thumb.php;
  49. fastcgi_param SCRIPT_FILENAME $document_root/wa-data/public/contacts/photos/thumb.php;
  50. }
  51.  
  52. # photos app
  53. location ~* ^/wa-data/public/photos/[0-9]+/ {
  54. access_log off;
  55. expires 30d;
  56. error_page 404 = @photos_thumb;
  57. }
  58.  
  59. location @photos_thumb {
  60. include snippets/fastcgi-php.conf;
  61. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  62. fastcgi_param SCRIPT_NAME /wa-data/public/photos/thumb.php;
  63. fastcgi_param SCRIPT_FILENAME $document_root/wa-data/public/photos/thumb.php;
  64. }
  65. # end photos app
  66.  
  67. # shop app
  68. location ~* ^/wa-data/public/shop/products/[0-9]+/ {
  69. access_log off;
  70. expires 30d;
  71. error_page 404 = @shop_thumb;
  72. }
  73. location @shop_thumb {
  74. include snippets/fastcgi-php.conf;
  75. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  76. fastcgi_param SCRIPT_NAME /wa-data/public/shop/products/thumb.php;
  77. fastcgi_param SCRIPT_FILENAME $document_root/wa-data/public/shop/products/thumb.php;
  78. }
  79. # end shop app
  80.  
  81. # mailer app
  82. location ~* ^/wa-data/public/mailer/files/[0-9]+/ {
  83. access_log off;
  84. error_page 404 = @mailer_file;
  85. }
  86. location @mailer_file {
  87. include snippets/fastcgi-php.conf;
  88. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  89. fastcgi_param SCRIPT_NAME /wa-data/public/mailer/files/file.php;
  90. fastcgi_param SCRIPT_FILENAME $document_root/wa-data/public/mailer/files/file.php;
  91. }
  92. # end mailer app
  93.  
  94. location ~* ^.+\.(jpg|jpeg|gif|png|js|css)$ {
  95. access_log off;
  96. expires 30d;
  97. }
  98. }
RAW Paste Data