Advertisement
corzopabloariel

Laravel

Sep 2nd, 2020
1,109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.79 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.     server_name example.com;
  4.     root /srv/example.com/public;
  5.  
  6.     add_header X-Frame-Options "SAMEORIGIN";
  7.     add_header X-XSS-Protection "1; mode=block";
  8.     add_header X-Content-Type-Options "nosniff";
  9.  
  10.     index index.php;
  11.  
  12.     charset utf-8;
  13.  
  14.     location / {
  15.         try_files $uri $uri/ /index.php?$query_string;
  16.     }
  17.  
  18.     location = /favicon.ico { access_log off; log_not_found off; }
  19.     location = /robots.txt  { access_log off; log_not_found off; }
  20.  
  21.     error_page 404 /index.php;
  22.  
  23.     location ~ \.php$ {
  24.         fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
  25.         fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
  26.         include fastcgi_params;
  27.     }
  28.  
  29.     location ~ /\.(?!well-known).* {
  30.         deny all;
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement