Skip to content

Instantly share code, notes, and snippets.

@stivncastillo
Created June 21, 2017 20:29
Show Gist options
  • Save stivncastillo/465241cb3754e27a058e21f9a521d41b to your computer and use it in GitHub Desktop.
Save stivncastillo/465241cb3754e27a058e21f9a521d41b to your computer and use it in GitHub Desktop.
server {
listen 80;
listen [::]:80;
root /home/ubuntu/projects/finlog-backend/web;
# Add index.php to the list if you are using PHP
index index.php app.php index.html index.htm index.nginx-debian.html;
server_name finlog.creardigital.com www.finlog.creardigital.com;
try_files $uri @rewriteapp;
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location / {
#try_files $uri $uri/ =404;
try_files $uri /app.php$is_args$args;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
location ~ /\.ht {
deny all;
}
error_log /var/log/nginx/finlog_error.log;
access_log /var/log/nginx/finlog_access.log;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment