Advertisement
dockling

Untitled

Nov 2nd, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.92 KB | None | 0 0
  1. # Website
  2. server {
  3.     listen 80 default_server;
  4.  
  5.     server_name myapp.local;
  6.  
  7.     access_log /var/log/nginx/access.log;
  8.     error_log /var/log/nginx/error.log;
  9.  
  10.     root /application/public;
  11.     index index.html index.htm index.php;
  12.  
  13.     location / {
  14.         index index.php;
  15.         try_files $uri $uri/ /index.php?q=$uri&$args;
  16.     }
  17.  
  18.     location ~*  \.(jpg|jpeg|png|gif|ico|css|js|svg)$ {
  19.         expires 1h;
  20.     }
  21.  
  22.     location ~ [^/]\.php(/|$) {
  23.         fastcgi_pass php-fpm:9000;
  24.         fastcgi_index index.php;
  25.         # fastcgi_param HTTPS on;
  26.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  27.         fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
  28.         fastcgi_param REMOTE_ADDR $http_x_real_ip;
  29.         fastcgi_read_timeout 600;
  30.         fastcgi_buffers 16 16k;
  31.         fastcgi_buffer_size 32k;
  32.         include fastcgi_params;
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement