yoesoff

nginx conf

Aug 17th, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.13 KB | None | 0 0
  1.  server {
  2.      listen          80 default_server;
  3.      listen          [::]:80 default_server;
  4.      server_name     localhost;
  5.  
  6.      root            /var/www;
  7.      index           index.php index.html index.htm;
  8.  
  9.      error_log       /var/log/nginx/error.log;
  10.      access_log      /var/log/nginx/access.log;
  11.  
  12.      location / {
  13.          try_files $uri $uri/ =404;
  14.      }
  15.  
  16.      #https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-ubuntu-18-04
  17.      #https://www.linode.com/docs/web-servers/nginx/serve-php-php-fpm-and-nginx/
  18.      #https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
  19.      location ~* \.php$ {
  20.          try_files $uri =404;
  21.          fastcgi_index index.php;
  22.          fastcgi_send_timeout 600s;
  23.          fastcgi_read_timeout 600s;
  24.          fastcgi_pass doclearn_php_fpm:9000;
  25.          fastcgi_split_path_info ^(.+\.php)(/.*)$;
  26.          include fastcgi_params;
  27.          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  28.          #fastcgi_param HTTPS off;
  29.      }
  30.  
  31.      location ~ /\.ht {
  32.          deny all;
  33.      }
  34.  }
Advertisement
Add Comment
Please, Sign In to add comment