Advertisement
admin_wakafsalman

Server Configuration

Aug 27th, 2023
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.87 KB | Source Code | 0 0
  1. server {
  2.  
  3.     client_max_body_size 120M;
  4.     server_name DOMAIN NAME;
  5.     root /var/www/PROJECT NAME/public;
  6.  
  7.     add_header X-Frame-Options "SAMEORIGIN";
  8.     add_header X-XSS-Protection "1; mode=block";
  9.     add_header X-Content-Type-Options "nosniff";
  10.  
  11.     index index.html index.htm index.php;
  12.  
  13.     charset utf-8;
  14.  
  15.     location / {
  16.         try_files $uri $uri/ /index.php?$query_string;
  17.     }
  18.  
  19.     location = /favicon.ico { access_log off; log_not_found off; }
  20.     location = /robots.txt  { access_log off; log_not_found off; }
  21.  
  22.     error_page 404 /index.php;
  23.  
  24.     location ~ \.php$ {
  25.         fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
  26.         fastcgi_index index.php;
  27.         fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
  28.         include fastcgi_params;
  29.     }
  30.  
  31.     location ~ /\.(?!well-known).* {
  32.         deny all;
  33.     }
  34.  
  35. }
  36.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement