mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-18 20:37:55 +00:00
Adding nginx-mainline support
This commit is contained in:
parent
90041b2ee2
commit
31742bd84b
11
.devilbox/etc/nginx-mainline/00-defaults.conf
Normal file
11
.devilbox/etc/nginx-mainline/00-defaults.conf
Normal file
@ -0,0 +1,11 @@
|
||||
access_log /var/log/nginx-mainline/access.log main;
|
||||
error_log /var/log/nginx-mainline/error.log warn;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
send_timeout 60;
|
||||
keepalive_timeout 10;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
56
.devilbox/etc/nginx-mainline/01-vhost-default.conf
Normal file
56
.devilbox/etc/nginx-mainline/01-vhost-default.conf
Normal file
@ -0,0 +1,56 @@
|
||||
##
|
||||
## Default Host for http://localhost
|
||||
##
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
|
||||
# Root directive
|
||||
root /var/www/default/htdocs;
|
||||
index index.php;
|
||||
|
||||
access_log /var/log/nginx-mainline/localhost-access.log main;
|
||||
error_log /var/log/nginx-mainline/localhost-error.log warn;
|
||||
|
||||
|
||||
# Front-controller pattern as recommended by the nginx docs
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
}
|
||||
|
||||
# PHP FPM
|
||||
location ~ \.php?$ {
|
||||
# PHP.INI:
|
||||
# ---------------------------
|
||||
# // Find this:
|
||||
# cgi.fix_pathinfo=1
|
||||
# // Replace with:
|
||||
# cgi.fix_pathinfo=0
|
||||
|
||||
try_files $uri = 404;
|
||||
include fastcgi_params;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||
|
||||
#### FPM Server
|
||||
fastcgi_pass 172.16.238.11:9000;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_intercept_errors on;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# disallow access to git configs path
|
||||
location ~ /\.git {
|
||||
deny all;
|
||||
}
|
||||
}
|
56
.devilbox/etc/nginx-mainline/02-vhost-mass.conf
Normal file
56
.devilbox/etc/nginx-mainline/02-vhost-mass.conf
Normal file
@ -0,0 +1,56 @@
|
||||
##
|
||||
## Default Mass Virtual Host
|
||||
##
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name ~^(?<domain>.+)\.loc$;
|
||||
|
||||
# Root directive
|
||||
root /shared/httpd/$domain/htdocs/;
|
||||
index index.php;
|
||||
|
||||
access_log /var/log/nginx-mainline/$domain-access.log main;
|
||||
error_log /var/log/nginx-mainline/other-error.log warn;
|
||||
|
||||
|
||||
# Front-controller pattern as recommended by the nginx docs
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
}
|
||||
|
||||
# PHP FPM
|
||||
location ~ \.php?$ {
|
||||
# PHP.INI:
|
||||
# ---------------------------
|
||||
# // Find this:
|
||||
# cgi.fix_pathinfo=1
|
||||
# // Replace with:
|
||||
# cgi.fix_pathinfo=0
|
||||
|
||||
try_files $uri = 404;
|
||||
include fastcgi_params;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
||||
|
||||
#### SOCKET
|
||||
fastcgi_pass 172.16.238.11:9000;
|
||||
|
||||
fastcgi_index index.php;
|
||||
fastcgi_intercept_errors on;
|
||||
}
|
||||
|
||||
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
# disallow access to git configs path
|
||||
location ~ /\.git {
|
||||
deny all;
|
||||
}
|
||||
}
|
75
README.md
75
README.md
@ -1,26 +1,39 @@
|
||||
# Devilbox
|
||||
# ![Devilbox](https://raw.githubusercontent.com/cytopia/devilbox/master/.devilbox/www/htdocs/assets/img/devilbox_80.png) Devilbox
|
||||
|
||||
The ultimate Docker-based LAMP/LEMP Stack for your development host.
|
||||
The devilbox is a `docker-compose` setup for your prefered LAMP/LEMP stack.
|
||||
|
||||
## Overview
|
||||
It is basically a pre-configured set of the below listed docker containers including a custom intranet which gives you an overview about your projects and
|
||||
keeps track if they have been setup correctly.
|
||||
|
||||
* All logs are available on your Host computer
|
||||
* MySQL localhost socket is available in PHP container
|
||||
* MySQL `127.0.0.1:3006` is available in PHP container
|
||||
* Xdebug is included
|
||||
<sub>There is no need to setup Virtual Hosts for new projects, all provided webservers are pre-configured with mass-virtual hosts and are automatically linked to a PHP-FPM server of your prefered version.</sub>
|
||||
|
||||
## Easy usage
|
||||
|
||||
You are up and running in three simple steps:
|
||||
|
||||
```bash
|
||||
# Copy the example configuration file
|
||||
$ cp env-example .env
|
||||
|
||||
# Edit your configuration
|
||||
$ vim .env
|
||||
|
||||
# Start the dockers
|
||||
$ docker-compose up
|
||||
```
|
||||
|
||||
## Run-time Matrix
|
||||
|
||||
You can choose any combination of the following docker images during run-time:
|
||||
Select your prefered setup.
|
||||
|
||||
<sub>This is under active development. Only the linkable items work at the moment.</sub>
|
||||
No need to install and configure different versions locally. Simply choose your required LAMP/LEMP stack combination during startup and it is up and running instantly.
|
||||
|
||||
| Webserver | Database | PHP |
|
||||
|-----------|----------|-----|
|
||||
| [Apache 2.2](https://github.com/cytopia/docker-apache-2.2) | [MySQL 5.5](https://github.com/cytopia/docker-mysql-5.5) | [PHP 5.4](https://github.com/cytopia/docker-php-fpm-5.4) |
|
||||
| [Apache 2.4](https://github.com/cytopia/docker-apache-2.4) | MySQL 5.6 | [PHP 5.5](https://github.com/cytopia/docker-php-fpm-5.5) |
|
||||
| [Nginx stable](https://github.com/cytopia/docker-nginx-stable) | MySQL 5.7 | [PHP 5.6](https://github.com/cytopia/docker-php-fpm-5.6) |
|
||||
| Nginx mainline | MariaDB 5 | [PHP 7.0](https://github.com/cytopia/docker-php-fpm-7.0) |
|
||||
| [![Build Status](https://travis-ci.org/cytopia/docker-apache-2.2.svg?branch=master)](https://travis-ci.org/cytopia/docker-apache-2.2) [Apache 2.2](https://github.com/cytopia/docker-apache-2.2) | [MySQL 5.5](https://github.com/cytopia/docker-mysql-5.5) | [PHP 5.4](https://github.com/cytopia/docker-php-fpm-5.4) |
|
||||
| [![Build Status](https://travis-ci.org/cytopia/docker-apache-2.4.svg?branch=master)](https://travis-ci.org/cytopia/docker-apache-2.4) [Apache 2.4](https://github.com/cytopia/docker-apache-2.4) | MySQL 5.6 | [PHP 5.5](https://github.com/cytopia/docker-php-fpm-5.5) |
|
||||
| [![Build Status](https://travis-ci.org/cytopia/docker-nginx-stable.svg?branch=master)](https://travis-ci.org/cytopia/docker-nginx-stable) [Nginx stable](https://github.com/cytopia/docker-nginx-stable) | MySQL 5.7 | [PHP 5.6](https://github.com/cytopia/docker-php-fpm-5.6) |
|
||||
| [![Build Status](https://travis-ci.org/cytopia/docker-nginx-mainline.svg?branch=master)](https://travis-ci.org/cytopia/docker-nginx-mainline) [Nginx mainline](https://github.com/cytopia/docker-nginx-mainline) | MariaDB 5 | [PHP 7.0](https://github.com/cytopia/docker-php-fpm-7.0) |
|
||||
| | MariaDB 10 | [PHP 7.1](https://github.com/cytopia/docker-php-fpm-7.1) |
|
||||
|
||||
|
||||
@ -36,22 +49,32 @@ You can choose any combination of the following docker images during run-time:
|
||||
|
||||
<sub>Not all docker categories need to be started.</sub>
|
||||
-->
|
||||
## Feature overview
|
||||
|
||||
## Start
|
||||
|
||||
1. Copy `env-example` to `.env`
|
||||
2. Edit `.env`
|
||||
3. `docker-compose up`
|
||||
* Dynamically Configured Mass Virtual Hosting
|
||||
* Configuration overwrites (`my.cnf`, `nginx.conf`, `httpd.conf` or `php.ini`)
|
||||
* Log files available on host computer
|
||||
* MySQL socket (available on host computer and PHP container)
|
||||
* MySQL connectivity (reachable from host computer and from PHP container via `127.0.0.1` and `localhost`)
|
||||
* Xdebug
|
||||
|
||||
|
||||
## Pre-configured Intranet
|
||||
|
||||
1. Homepage with host / docker information
|
||||
2. Virtual Host overview
|
||||
3. Database overview
|
||||
4. PHPinfo() page
|
||||
## Intranet overview
|
||||
|
||||
### 1. Homepage with host / docker information
|
||||
The devilbox comes with a pre-configured intranet on `http://localhost`
|
||||
|
||||
* Virtua lHost overview
|
||||
* Database overview
|
||||
* PHP Info
|
||||
* MySQL Info
|
||||
* PHPMyAdmin
|
||||
* Opcache GUI
|
||||
|
||||
|
||||
## Screenshots
|
||||
|
||||
**Homepage with host / docker information**
|
||||
|
||||
The homepage shows you the status of your current configured setup.
|
||||
|
||||
@ -62,7 +85,7 @@ The homepage shows you the status of your current configured setup.
|
||||
![Intranet Home](https://raw.githubusercontent.com/cytopia/devilbox/master/doc/img/01_intranet_home.png "Intranet Home")
|
||||
|
||||
|
||||
### 2. Virtual Host overview
|
||||
**Virtual Host overview**
|
||||
|
||||
This overview shows you all available virtual hosts and if they need additional configuration (on the host)
|
||||
|
||||
@ -73,7 +96,7 @@ Virtual Hosts are considered valid if the following requirements are met (on the
|
||||
|
||||
![Intranet vHost](https://raw.githubusercontent.com/cytopia/devilbox/master/doc/img/02_intranet_vhosts.png "Intranet Home")
|
||||
|
||||
### 3. Database overview
|
||||
**Database overview**
|
||||
|
||||
Shows you all the databases that are loaded
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user