Brief introduction
Docker Docker LNMP is based on the PHP integrated development environment.
Github address: https: //github.com/YanlongMa/docker-lnmp
Software included
- nginx
- php 7.1
- mysql
- repeat
- mongo
Download Docker LNMP
docker-lnmp default is mapped to the same directory php-fpm container working directory, the same directory download docker-lnmp in the project:
$ git clone https://github.com/yanlongma/docker-lnmp.git
Start Docker LNMP
Enter docker-lnmp directory, start the service:
$ docker-compose up -d
Creating network "dockerlnmp_default" with the default driver
Creating dockerlnmp_nginx_1 ... done
Creating dockerlnmp_php-fpm_1 ... done
Creating dockerlnmp_redis_1 ... done
Creating dockerlnmp_mongo_1 ... done
Creating dockerlnmp_mysql_1 ... done
After a successful start in the same directory docker-lnmp New phpinfo.php files, browser access http://localhost/phpinfo.php
, you can see the phpinfo () information.
Close Docker LNMP
Enter docker-lnmp directory, shut down the service:
$ docker-compose down
Virtual Host Configuration
Please refer to nignx/conf.d/yii.conf
the file, you configure the need to restart the service.