-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tec: Serve files with Nginx in development
The PHP server was really slow to stop. It gets a lot better with Nginx.
- Loading branch information
1 parent
e406d09
commit 6d59863
Showing
6 changed files
with
55 additions
and
41 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
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,43 @@ | ||
server { | ||
listen 8000; | ||
server_name _; | ||
|
||
root /var/www/html/public; | ||
index index.html index.php; | ||
|
||
error_log /var/log/nginx/error.log; | ||
access_log /var/log/nginx/access.log; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php$is_args$query_string; | ||
} | ||
|
||
location ~ index.php$ { | ||
fastcgi_pass php:9000; | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
include fastcgi.conf; | ||
} | ||
} | ||
|
||
server { | ||
listen 8001; | ||
server_name _; | ||
|
||
root /var/www/html/tests/mock_server; | ||
index index.html index.php; | ||
|
||
error_log /var/log/nginx/error.log; | ||
access_log /var/log/nginx/access.log; | ||
|
||
location / { | ||
try_files $uri $uri/ /index.php$is_args$query_string; | ||
} | ||
|
||
location ~ index.php$ { | ||
fastcgi_pass php:9000; | ||
fastcgi_split_path_info ^(.+\.php)(/.*)$; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
include fastcgi.conf; | ||
} | ||
} |
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
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