added php support
This commit is contained in:
parent
95c24321c3
commit
3427c97256
4
builds/php/Dockerfile
Normal file
4
builds/php/Dockerfile
Normal file
@ -0,0 +1,4 @@
|
||||
FROM php:7.4-fpm
|
||||
|
||||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
|
||||
|
@ -35,7 +35,7 @@ server {
|
||||
#access_log /var/log/nginx/host.access.log main;
|
||||
|
||||
location / {
|
||||
root /var/www;
|
||||
root /var/www/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
@ -56,13 +56,13 @@ server {
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# root html;
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
# fastcgi_index index.php;
|
||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
||||
# include fastcgi_params;
|
||||
#}
|
||||
location ~ \.php$ {
|
||||
root html;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
|
@ -6,6 +6,11 @@ services:
|
||||
- 80:80
|
||||
volumes:
|
||||
- ./configs/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
- ./data/www:/var/www:ro
|
||||
- ./data/www:/var/www/html:ro
|
||||
php:
|
||||
build: builds/php
|
||||
volumes:
|
||||
- ./data/www:/var/www/html
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user