Skip to content

Commit

Permalink
Nginx: use default container + update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
stucki committed Nov 11, 2016
1 parent 08d8cdc commit 8051634
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 30 deletions.
6 changes: 4 additions & 2 deletions docker-compose.yml
@@ -1,9 +1,11 @@
nginx:
build: nginx-fpm
web:
image: nginx:1.11-alpine
links:
- php
ports:
- "8080:80"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
volumes_from:
- htdocs
php:
Expand Down
2 changes: 0 additions & 2 deletions nginx-fpm/Dockerfile

This file was deleted.

26 changes: 0 additions & 26 deletions nginx-fpm/nginx-fpm.conf

This file was deleted.

17 changes: 17 additions & 0 deletions nginx.conf
@@ -0,0 +1,17 @@
server {
index index.php index.html;
server_name php-docker.local;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www/html;

location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}

0 comments on commit 8051634

Please sign in to comment.