Adding: nxing

This commit is contained in:
cytopia 2016-10-17 04:05:30 +02:00
parent aae713abea
commit 291db3417d
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
5 changed files with 129 additions and 63 deletions

View File

@ -0,0 +1,11 @@
access_log /var/log/nginx-stable/access.log main;
error_log /var/log/nginx-stable/error.log warn;
charset utf-8;
send_timeout 60;
keepalive_timeout 10;
sendfile on;
tcp_nopush on;
tcp_nodelay on;

View 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-stable/localhost-access.log main;
error_log /var/log/nginx-stable/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)(.*)$;
#### 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;
}
}

View 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-stable/$domain-access.log main;
error_log /var/log/nginx-stable/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;
}
}

View File

@ -19,7 +19,7 @@ You can choose any combination of the following docker images during run-time:
|-----------|----------|-----|
| [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 | MySQL 5.7 | [PHP 5.6](https://github.com/cytopia/docker-php-fpm-5.6) |
| [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) |
| | MariaDB 10 | [PHP 7.1](https://github.com/cytopia/docker-php-fpm-7.1) |

View File

@ -37,8 +37,9 @@ DEBUG_COMPOSE_ENTRYPOINT=0
###
#HTTPD_SERVER=apache-2.2
HTTPD_SERVER=apache-2.4
#HTTPD_SERVER=nginx-1
#HTTPD_SERVER=apache-2.4
HTTPD_SERVER=nginx-stable
#HTTPD_SERVER=nginx-mainline
###
@ -61,7 +62,6 @@ MYSQL_SERVER=mysql-5.5
PHP_SERVER=php-fpm-5.6
#PHP_SERVER=php-fpm-7.0
#PHP_SERVER=php-fpm-7.1
#PHP_SERVER=hhvm-3
@ -87,7 +87,7 @@ TIMEZONE=Europe/Berlin
## Local filesystem path to www projects.
##
##
HOST_PATH_TO_WWW_DOCROOTS=~/Sites
HOST_PATH_TO_WWW_DOCROOTS=./data/www
##
## Local filesystem path to mysql datadir.
@ -99,7 +99,7 @@ HOST_PATH_TO_WWW_DOCROOTS=~/Sites
## If this directory is empty, a new mysql database will be
## created.
##
HOST_PATH_TO_MYSQL_DATADIR=~/data/mysql4
HOST_PATH_TO_MYSQL_DATADIR=./data/mysql
@ -138,13 +138,6 @@ MYSQL_ROOT_PASSWORD=
###
MYSQL_GENERAL_LOG=1
MYSQL_INNODB_BUFFER_POOL_SIZE=512M
MYSQL_JOIN_BUFFER_SIZE=128M
MYSQL_SORT_BUFFER_SIZE=2M
MYSQL_READ_RND_BUFFER_SIZE=2M
MYSQL_SYMBOLIC_LINKS=0
MYSQL_SQL_MODE=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
@ -169,54 +162,4 @@ PHP_XDEBUG_REMOTE_PORT=9000
# Your local IP address (your computer host [not the docker])
# where your ide/editor is listening for xdebug connections.
PHP_XDEBUG_REMOTE_HOST=172.20.10.2
## TODO: Check if it works by automatically sending it to the broadcast address
###
### PHP Tweaks
###
# php.ini default setting:
# max_execution_time = 30
PHP_MAX_EXECUTION_TIME=90
# php.ini default setting:
# max_input_time = 60
PHP_MAX_INPUT_TIME=90
# php.ini default setting:
# memory_limit = 128M
PHP_MEMORY_LIMIT=256M
# php.ini default setting:
# post_max_size = 8M
PHP_POST_MAX_SIZE=100M
# php.ini default setting:
# upload_max_filesize = 2M
PHP_UPLOAD_MAX_FILESIZE=100M
# php.ini default setting:
# max_input_vars = 1000
PHP_MAX_INPUT_VARS=8000
###
### PHP Error Handling
###
# php.ini default setting:
# error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
PHP_ERROR_REPORTING=E_ALL
# php.ini default setting:
# display_errors = Off
PHP_DISPLAY_ERRORS=On
# php.ini default setting:
# track_errors = Off
PHP_TRACK_ERRORS=On