Skip to content

Instantly share code, notes, and snippets.

@untillnesss
Created August 3, 2020 06:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save untillnesss/18fc914512f7d2eb9d57332fea78ceec to your computer and use it in GitHub Desktop.
Save untillnesss/18fc914512f7d2eb9d57332fea78ceec to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name said-fullstack.oceancods.com;
root /var/www/mjp-said/mjp-challenge/public;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_page 404 /index.php;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include fastcgi_params;
fastcgi_read_timeout 600;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.(?!well-known).* {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment