Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.15 KB | None | 0 0
  1. server {
  2.     server_name 10.eleanorlocal.com www.10.eleanorlocal.com;
  3.  
  4.     root /var/www/eleanor/10;
  5.  
  6.     index index.php;
  7.  
  8.     access_log  /var/log/nginx/eleanor.access.log combined;
  9.     error_log   /var/log/nginx/eleanor.error.log;
  10.  
  11.     charset utf-8;
  12.  
  13.     location / {
  14.         try_files $uri $uri/ @fallback;
  15.     }
  16.  
  17.     location @fallback {
  18.         rewrite  ^(.*)$ /index.php?$args last;
  19.     }
  20.  
  21.     location ~ \.php$ {
  22.         root /var/www/eleanor/10;
  23.         proxy_read_timeout 61;
  24.         fastcgi_read_timeout 61;
  25.         try_files $uri $uri/ =404;
  26.         #   Путь до сокета демона PHP-FPM
  27.         fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
  28.         fastcgi_index index.php;
  29.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  30.         include fastcgi_params;
  31.     }
  32.  
  33.     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
  34.         expires max;
  35.         log_not_found off;
  36.     }
  37.  
  38.     if ($uri !~ ".(css|js|jpe?g|gif|png|bmp)$"){
  39.         set $rule_0 1$rule_0;
  40.     }
  41.     if ($rule_0 = "1"){
  42.         rewrite ^/uploads/(.*)$ /download.php?download=$1 last;
  43.     }
  44.  
  45.     location ~ /\.ht {
  46.         deny  all;
  47.     }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement