Skip to content

Instantly share code, notes, and snippets.

@tyluudinh
Created May 18, 2017 05:22
Show Gist options
  • Save tyluudinh/d3c7296a561eb62c9fc53fee122ef656 to your computer and use it in GitHub Desktop.
Save tyluudinh/d3c7296a561eb62c9fc53fee122ef656 to your computer and use it in GitHub Desktop.
server {
listen 80;
#listen [::]:80 default_server;
root /home/tyluu/projects/KLTN/Code/Radius-login-php;
# Add index.php to the list if you are using PHP
index index.php; #index.html index.htm index.nginx-debian.html;
server_name radius-login.dev;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ ^/assets/.*\.php$ {
deny all;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
#fastcgi_pass php7.0-fpm;
try_files $uri =404;
}
location ~* /\. {
deny all;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment