Guest User

Untitled

a guest
Jun 20th, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. server {
  2. # server_name 78.155.217.88;
  3. server_name *.*;
  4. charset UTF-8;
  5. index index.php index.html;
  6. access_log /var/log/nginx/localhost.access.log;
  7. error_log /var/log/nginx/localhost.error.log notice;
  8. # set $root_path /var/www/html;
  9. set $root_path /var/www/html/$host;
  10. root $root_path;
  11.  
  12. location / {
  13. try_files $uri $uri/ =404;
  14. }
  15.  
  16. location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2?|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|js|css|mp3|ogg|mpe?g|avi|swf)$ {
  17. expires max;
  18. }
  19.  
  20. location ~* \.php$ {
  21. root $root_path;
  22. proxy_read_timeout 61;
  23. fastcgi_read_timeout 61;
  24. try_files $uri $uri/ =404;
  25.  
  26. # Ïóòü ê ñîêåòó PHP-FPM
  27. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  28. fastcgi_index index.php;
  29. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  30. include fastcgi_params;
  31. fastcgi_buffer_size 16k;
  32. fastcgi_buffers 4 16k;
  33. access_log /var/log/nginx/access.log main;
  34. }
  35.  
  36. listen *:80 default_server;
  37. }
Add Comment
Please, Sign In to add comment