diff options
author | Phil Burton <phil@pgburton.com> | 2017-08-20 01:42:41 +0100 |
---|---|---|
committer | Phil Burton <phil@pgburton.com> | 2017-08-20 01:42:41 +0100 |
commit | 3219d077917b1a6cb01a8cbdd288b71e515717a6 (patch) | |
tree | a1e26ab25d565d73eadfce8d01acfecc21cbaa82 /nginx.php |
inital commit
Diffstat (limited to 'nginx.php')
-rw-r--r-- | nginx.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nginx.php b/nginx.php new file mode 100644 index 0000000..e362fb3 --- /dev/null +++ b/nginx.php @@ -0,0 +1,21 @@ +<?php + +return [ + "server { + listen *; + server_name %s; + + access_log /web/sites/%s/logs/%s.access_log main; + error_log /web/sites/%s/logs/%s.error_log info; + + root /web/sites/%s/web; + + location ~ \.php$ { + # Test for non-existent scripts or throw a 404 error + # Without this line, nginx will blindly send any request ending in .php to php-fpm + try_files \$uri =404; + include /etc/nginx/fastcgi.conf; + fastcgi_pass unix:/run/php7-fpm.sock; + } +}" +]; |