Advertisement
alpa_s

Untitled

May 15th, 2018
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. server {
  2. listen 80;
  3. root /app;
  4. index index.php index.html;
  5. charset utf-8;
  6.  
  7. server_name fazze.loc;
  8.  
  9. location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js)$ {
  10. access_log off;
  11. expires max;
  12. }
  13.  
  14. location / {
  15. root /frontend;
  16. try_files $uri /frontend/web/index.php?$args;
  17. }
  18.  
  19. location /backend {
  20. try_files $uri /backend/web/index.php?$args;
  21. }
  22.  
  23. # storage access
  24. location /storage {
  25. try_files $uri /storage/web/index.php?$args;
  26. }
  27.  
  28. client_max_body_size 32m;
  29.  
  30. location ~ \.php$ {
  31. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  32. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  33. fastcgi_pass php-fpm;
  34. fastcgi_index index.php;
  35. include fastcgi_params;
  36.  
  37. ## Cache
  38. # fastcgi_pass_header Cookie; # fill cookie valiables, $cookie_phpsessid for exmaple
  39. # fastcgi_ignore_headers Cache-Control Expires Set-Cookie; # Use it with caution because it is cause SEO problems
  40. # fastcgi_cache_key "$request_method|$server_addr:$server_port$request_uri|$cookie_phpsessid"; # generating unique key
  41. # fastcgi_cache fastcgi_cache; # use fastcgi_cache keys_zone
  42. # fastcgi_cache_path /tmp/nginx/ levels=1:2 keys_zone=fastcgi_cache:16m max_size=256m inactive=1d;
  43. # fastcgi_temp_path /tmp/nginx/temp 1 2; # temp files folder
  44. # fastcgi_cache_use_stale updating error timeout invalid_header http_500; # show cached page if error (even if it is outdated)
  45. # fastcgi_cache_valid 200 404 10s; # cache lifetime for 200 404;
  46. # or fastcgi_cache_valid any 10s; # use it if you want to cache any responses
  47. }
  48. }
  49.  
  50. ## PHP-FPM Servers ##
  51. upstream php-fpm {
  52. server app:9000;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement