mirror of
https://github.com/mashirozx/docker-php-nginx.git
synced 2024-12-12 09:54:37 +08:00
Describe the way to customize the configuration of Nginx and PHP
This commit is contained in:
parent
5fa9be019b
commit
341cc9c6b4
18
README.md
18
README.md
@ -40,3 +40,21 @@ See the PHP info on http://localhost, or the static html page on http://localhos
|
||||
Or mount your own code to be served by PHP-FPM & Nginx
|
||||
|
||||
docker run -p 80:8080 -v ~/my-codebase:/var/www/html trafex/alpine-nginx-php7
|
||||
|
||||
## Configuration
|
||||
In [config/](config/) you'll find the default configuration files for Nginx, PHP and PHP-FPM.
|
||||
If you want to extend or customize that you can do so by mounting a configuration file in the correct folder;
|
||||
|
||||
Nginx configuration:
|
||||
|
||||
docker run -v "`pwd`/nginx-server.conf:/etc/nginx/conf.d/server.conf" trafex/alpine-nginx-php7
|
||||
|
||||
PHP configuration:
|
||||
|
||||
docker run -v "`pwd`/php-setting.ini:/etc/php7/conf.d/settings.ini" trafex/alpine-nginx-php7
|
||||
|
||||
PHP-FPM configuration:
|
||||
|
||||
docker run -v "`pwd`/php-fpm-settings.conf:/etc/php7/php-fpm.d/server.conf" trafex/alpine-nginx-php7
|
||||
|
||||
_Note; Because `-v` requires an absolute path I've added `pwd` in the example to return the absolute path to the current directory_
|
||||
|
Loading…
Reference in New Issue
Block a user