Skip to content

Instantly share code, notes, and snippets.

@hugoangeles0810
Last active July 4, 2016 16:50
Show Gist options
  • Save hugoangeles0810/5fdd38cd280d6d46aaae87436c952ab5 to your computer and use it in GitHub Desktop.
Save hugoangeles0810/5fdd38cd280d6d46aaae87436c952ab5 to your computer and use it in GitHub Desktop.
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /var/www/html/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment