Docker deploying Nginx MySQL PHP7 in one key, support full feature functions.
- Support Multiple domains.
- Support HTTPS and HTTP/2.
- Support PHP7, Nginx and MySQL version latest.
- PHP source located in host.
- MySQL data directory in host.
- All conf files located in host.
- All log files located in host.
- Built-in PHP extensions install commands.
- Install
git
,docker
anddocker-compose
; - Clone project:
$ git clone https://github.com/yeszao/dnmp.git
- Start docker containers:
You may need use
$ docker-compose up
sudo
before this command in Linux. - Go to your browser and type
localhost
, you will see:
The index file is located in ./www/site1/
.
Default demo include 2 sites:
To preview them, add 2 lines to your hosts file (at /etc/hosts
on Linux and C:\Windows\System32\drivers\etc\hosts
on Windows):
127.0.0.1 www.site1.com
127.0.0.1 www.site2.com
Then you can visit from browser.