-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from outstack/replace-caddy-with-nginx
Replaced caddy with nginx
- Loading branch information
Showing
4 changed files
with
33 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
caddy: PYTHONUNBUFFERED=true /usr/sbin/caddy | ||
php: /usr/local/sbin/php-fpm -F | ||
nginx: PYTHONUNBUFFERED=true nginx -g 'pid /tmp/nginx.pid; daemon off;' | ||
php: /usr/local/sbin/php-fpm -F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
server { | ||
root /app/web; | ||
listen 80 default_server; | ||
|
||
location / { | ||
# try to serve file directly, fallback to app.php | ||
try_files $uri /app.php$is_args$args; | ||
} | ||
# PROD | ||
location ~ ^/app\.php(/|$) { | ||
fastcgi_pass 127.0.0.1:9000; | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | ||
fastcgi_param DOCUMENT_ROOT $realpath_root; | ||
internal; | ||
} | ||
|
||
# return 404 for all other php files not matching the front controller | ||
# this prevents access to other php files you don't want to be accessible. | ||
location ~ \.php$ { | ||
return 404; | ||
} | ||
|
||
} |