-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
unknown
authored and
unknown
committed
Mar 23, 2015
1 parent
73cd81f
commit d6c9bc6
Showing
4 changed files
with
90 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"AWSEBDockerrunVersion": 2, | ||
"volumes": [ | ||
{ | ||
"name": "php-app", | ||
"host": { | ||
"sourcePath": "/var/app/current/php-app" | ||
} | ||
}, | ||
{ | ||
"name": "nginx-proxy-conf", | ||
"host": { | ||
"sourcePath": "/var/app/current/proxy/conf.d" | ||
} | ||
} | ||
], | ||
"containerDefinitions": [ | ||
{ | ||
"name": "php-app", | ||
"image": "php:fpm", | ||
"essential": true, | ||
"memory": 128, | ||
"mountPoints": [ | ||
{ | ||
"sourceVolume": "php-app", | ||
"containerPath": "/var/www/html", | ||
"readOnly": true | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "nginx-proxy", | ||
"image": "nginx", | ||
"essential": true, | ||
"memory": 128, | ||
"portMappings": [ | ||
{ | ||
"hostPort": 80, | ||
"containerPort": 80 | ||
} | ||
], | ||
"links": [ | ||
"php-app" | ||
], | ||
"mountPoints": [ | ||
{ | ||
"sourceVolume": "php-app", | ||
"containerPath": "/var/www/html", | ||
"readOnly": true | ||
}, | ||
{ | ||
"sourceVolume": "awseb-logs-nginx-proxy", | ||
"containerPath": "/var/log/nginx" | ||
}, | ||
{ | ||
"sourceVolume": "nginx-proxy-conf", | ||
"containerPath": "/etc/nginx/conf.d", | ||
"readOnly": true | ||
} | ||
] | ||
} | ||
] | ||
} |
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,3 @@ | ||
<h1>Hello World!!!</h1> | ||
<h3>PHP Version <?= phpversion() ?></h3> | ||
<a href="/static.html">Static HTML Page</a> |
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,2 @@ | ||
<h1>This is a static HTML page</h1> | ||
<a href="/">Go Back</a> |
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,22 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
root /var/www/html; | ||
|
||
index index.php; | ||
|
||
location ~ [^/]\.php(/|$) { | ||
fastcgi_split_path_info ^(.+?\.php)(/.*)$; | ||
if (!-f $document_root$fastcgi_script_name) { | ||
return 404; | ||
} | ||
|
||
include fastcgi_params; | ||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
fastcgi_param PATH_INFO $fastcgi_path_info; | ||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | ||
|
||
fastcgi_pass php-app:9000; | ||
fastcgi_index index.php; | ||
} | ||
} |