jimmyfish

Nginx Laravel FPM

Dec 10th, 2019
705
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.     listen 80;
  3.     listen [::]:80;
  4.     server_name example.com www.example.com;
  5.  
  6.     root /folder/to/public;
  7.  
  8.     # Add index.php to the list if you are using PHP
  9.     index index.php;
  10.  
  11.     access_log /var/www/nginx-acc.log;
  12.     error_log /var/www/nginx-err.log;
  13.  
  14.     location / {
  15.         error_page 550 = @protected;
  16.         recursive_error_pages on;
  17.  
  18.         try_files $uri $uri/ /index.php@is_args@args;
  19.     }
  20.  
  21.     location ~ \.php$ {
  22.         fastcgi_index index.php;
  23.         fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
  24.         fastcgi_keep_conn on;
  25.         include /etc/nginx/fastcgi_params;
  26.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  27.         try_files $uri =404;
  28.     }
  29.  
  30.     location ~/\. {
  31.         deny all;
  32.     }
  33.  
  34. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×