Skip to content

Instantly share code, notes, and snippets.

@sagar290
Created February 2, 2021 11:58
Show Gist options
  • Select an option

  • Save sagar290/d3ce289a6c5c4aef52e61ec3bf4bd636 to your computer and use it in GitHub Desktop.

Select an option

Save sagar290/d3ce289a6c5c4aef52e61ec3bf4bd636 to your computer and use it in GitHub Desktop.
server {
server_name server.com;
root /var/www/html/backend/public;
index index.html index.php;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment