mirror of
https://github.com/cytopia/devilbox.git
synced 2025-01-01 18:46:41 +00:00
REL-0.12 Attach new nginx Docker container
This commit is contained in:
parent
cac8a17bb6
commit
1ad6de7e4c
@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
// Fix DocumentRoot for VirtualDocumentRoot Hosts
|
|
||||||
$_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']);
|
|
@ -1,3 +0,0 @@
|
|||||||
<?php
|
|
||||||
// Fix DocumentRoot for VirtualDocumentRoot Hosts
|
|
||||||
$_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']);
|
|
@ -1,23 +0,0 @@
|
|||||||
CustomLog "/var/log/apache-2.2/access_log" combined
|
|
||||||
ErrorLog "/var/log/apache-2.2/error_log"
|
|
||||||
LogLevel warn
|
|
||||||
|
|
||||||
AddDefaultCharset UTF-8
|
|
||||||
|
|
||||||
# No DNS
|
|
||||||
HostnameLookups Off
|
|
||||||
#
|
|
||||||
Timeout 60
|
|
||||||
KeepAlive On
|
|
||||||
KeepAliveTimeout 10
|
|
||||||
MaxKeepAliveRequests 100
|
|
||||||
#
|
|
||||||
#
|
|
||||||
EnableMMAP Off
|
|
||||||
EnableSendfile Off
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
XSendFile On
|
|
||||||
XSendFilePath /shared/httpd
|
|
@ -1,6 +0,0 @@
|
|||||||
#### PHP-FPM config ####
|
|
||||||
|
|
||||||
AddType application/x-httpd-fastphp5 .php
|
|
||||||
Action application/x-httpd-fastphp5 /php5-fcgi
|
|
||||||
Alias /php5-fcgi /usr/local/bin/php-fcgi
|
|
||||||
FastCgiExternalServer /usr/local/bin/php-fcgi -host php:9000 -pass-header Authorization
|
|
@ -1,40 +0,0 @@
|
|||||||
##
|
|
||||||
## Default Host for http://localhost
|
|
||||||
##
|
|
||||||
NameVirtualHost *:80
|
|
||||||
|
|
||||||
<VirtualHost _default_:80>
|
|
||||||
ServerName localhost
|
|
||||||
ServerAlias 127.0.0.1
|
|
||||||
ServerAlias 172.16.238.*
|
|
||||||
ServerAlias httpd
|
|
||||||
|
|
||||||
ServerAdmin root@localhost
|
|
||||||
|
|
||||||
ErrorLog /var/log/apache-2.2/devilbox-error.log
|
|
||||||
CustomLog /var/log/apache-2.2/devilbox-access.log combined
|
|
||||||
|
|
||||||
DirectoryIndex index.php index.html
|
|
||||||
|
|
||||||
DocumentRoot "/var/www/default/htdocs"
|
|
||||||
<Directory "/var/www/default/htdocs">
|
|
||||||
DirectoryIndex index.php index.html
|
|
||||||
|
|
||||||
AllowOverride All
|
|
||||||
Options All
|
|
||||||
|
|
||||||
RewriteEngine on
|
|
||||||
RewriteBase /
|
|
||||||
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Location /devilbox-httpd-status>
|
|
||||||
SetHandler server-status
|
|
||||||
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
</Location>
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
@ -1,44 +0,0 @@
|
|||||||
##
|
|
||||||
## Default Mass Virtual Host
|
|
||||||
##
|
|
||||||
|
|
||||||
<VirtualHost *:80>
|
|
||||||
|
|
||||||
# Get the server name from the Host: header
|
|
||||||
UseCanonicalName Off
|
|
||||||
|
|
||||||
ServerName localhost
|
|
||||||
ServerAlias *.*
|
|
||||||
ServerAdmin root@localhost
|
|
||||||
|
|
||||||
# Required for DNS checking
|
|
||||||
SetEnvIf Origin "http(s)?://(domain1.org|localhost|127.0.0.1|httpd)$" AccessControlAllowOrigin=$0$1
|
|
||||||
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
|
|
||||||
|
|
||||||
LogFormat "%V;%h;%l;%u;%t;\"%r\";%>s;%b;\"%{Referer}i\";\"%{User-agent}i\"" vcommon
|
|
||||||
CustomLog "/var/log/apache-2.2/projects-access.log" vcommon
|
|
||||||
ErrorLog /var/log/apache-2.2/projects-error.log
|
|
||||||
|
|
||||||
DirectoryIndex index.php index.html
|
|
||||||
|
|
||||||
# When using VirtualDocumentRoot the PHP Env var DOCUMENT_ROOT
|
|
||||||
# is not filled, so we need to do that manually with a custom script.
|
|
||||||
VirtualDocumentRoot /shared/httpd/%-2+/htdocs/
|
|
||||||
php_admin_value auto_prepend_file /opt/bin/fix-virtual-docroot.php
|
|
||||||
|
|
||||||
# Devilbox API endpoint
|
|
||||||
Alias "/devilbox-api" "/var/www/default/api/devilbox-api"
|
|
||||||
|
|
||||||
<Directory "/shared/httpd/*/htdocs/">
|
|
||||||
DirectoryIndex index.php index.html
|
|
||||||
|
|
||||||
AllowOverride All
|
|
||||||
Options All
|
|
||||||
|
|
||||||
RewriteEngine on
|
|
||||||
RewriteBase /
|
|
||||||
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
</Directory>
|
|
||||||
</VirtualHost>
|
|
@ -1,23 +0,0 @@
|
|||||||
CustomLog "/var/log/apache-2.4/access_log" combined
|
|
||||||
ErrorLog "/var/log/apache-2.4/error_log"
|
|
||||||
LogLevel warn
|
|
||||||
|
|
||||||
AddDefaultCharset UTF-8
|
|
||||||
|
|
||||||
# No DNS
|
|
||||||
HostnameLookups Off
|
|
||||||
#
|
|
||||||
Timeout 60
|
|
||||||
KeepAlive On
|
|
||||||
KeepAliveTimeout 10
|
|
||||||
MaxKeepAliveRequests 100
|
|
||||||
#
|
|
||||||
#
|
|
||||||
EnableMMAP Off
|
|
||||||
EnableSendfile Off
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
XSendFile On
|
|
||||||
XSendFilePath /shared/httpd
|
|
@ -1,17 +0,0 @@
|
|||||||
#### PHP-FPM config ####
|
|
||||||
|
|
||||||
# enablereuse
|
|
||||||
# Defining a worker will improve performance
|
|
||||||
# And in this case, re-use the worker (dependent on support from the fcgi application)
|
|
||||||
# If you have enough idle workers, this would only improve the performance marginally
|
|
||||||
#
|
|
||||||
# enablereuse requires Apache 2.4.11 or later
|
|
||||||
#<Proxy "fcgi://php:9000/" enablereuse=on max=10></Proxy>
|
|
||||||
<FilesMatch "\.php$">
|
|
||||||
Require all granted
|
|
||||||
# Pick one of the following approaches
|
|
||||||
# Use the standard TCP socket
|
|
||||||
SetHandler "proxy:fcgi://php:9000"
|
|
||||||
# If your version of httpd is 2.4.9 or newer (or has the back-ported feature), you can use the unix domain socket
|
|
||||||
#SetHandler "proxy:unix:/path/to/app.sock|fcgi://localhost/:9000"
|
|
||||||
</FilesMatch>
|
|
@ -1,42 +0,0 @@
|
|||||||
##
|
|
||||||
## Default Host for http://localhost
|
|
||||||
##
|
|
||||||
|
|
||||||
|
|
||||||
<VirtualHost _default_:80>
|
|
||||||
ServerName localhost
|
|
||||||
ServerAlias 127.0.0.1
|
|
||||||
ServerAlias 172.16.238.*
|
|
||||||
ServerAlias httpd
|
|
||||||
|
|
||||||
ServerAdmin root@localhost
|
|
||||||
|
|
||||||
ErrorLog /var/log/apache-2.4/devilbox-error.log
|
|
||||||
CustomLog /var/log/apache-2.4/devilbox-access.log combined
|
|
||||||
|
|
||||||
DirectoryIndex index.php index.html
|
|
||||||
|
|
||||||
DocumentRoot "/var/www/default/htdocs"
|
|
||||||
<Directory "/var/www/default/htdocs">
|
|
||||||
DirectoryIndex index.php index.html
|
|
||||||
|
|
||||||
AllowOverride All
|
|
||||||
Options All
|
|
||||||
|
|
||||||
RewriteEngine on
|
|
||||||
RewriteBase /
|
|
||||||
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Location /devilbox-httpd-status>
|
|
||||||
SetHandler server-status
|
|
||||||
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
Require all granted
|
|
||||||
</Location>
|
|
||||||
|
|
||||||
</VirtualHost>
|
|
@ -1,45 +0,0 @@
|
|||||||
##
|
|
||||||
## Default Mass Virtual Host
|
|
||||||
##
|
|
||||||
|
|
||||||
<VirtualHost *:80>
|
|
||||||
|
|
||||||
# Get the server name from the Host: header
|
|
||||||
UseCanonicalName Off
|
|
||||||
|
|
||||||
ServerName localhost
|
|
||||||
ServerAlias *.*
|
|
||||||
ServerAdmin root@localhost
|
|
||||||
|
|
||||||
# Required for DNS checking
|
|
||||||
SetEnvIf Origin "http(s)?://(domain1.org|localhost|127.0.0.1|httpd)$" AccessControlAllowOrigin=$0$1
|
|
||||||
Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
|
|
||||||
|
|
||||||
LogFormat "%V;%h;%l;%u;%t;\"%r\";%>s;%b;\"%{Referer}i\";\"%{User-agent}i\"" vcommon
|
|
||||||
CustomLog "/var/log/apache-2.4/projects-access.log" vcommon
|
|
||||||
ErrorLog /var/log/apache-2.4/projects-error.log
|
|
||||||
|
|
||||||
DirectoryIndex index.php index.html
|
|
||||||
|
|
||||||
# When using VirtualDocumentRoot the PHP Env var DOCUMENT_ROOT
|
|
||||||
# is not filled, so we need to do that manually with a custom script.
|
|
||||||
VirtualDocumentRoot /shared/httpd/%-2+/htdocs/
|
|
||||||
php_admin_value auto_prepend_file /opt/bin/fix-virtual-docroot.php
|
|
||||||
|
|
||||||
# Devilbox API endpoint
|
|
||||||
Alias "/devilbox-api" "/var/www/default/api/devilbox-api"
|
|
||||||
|
|
||||||
<Directory "/shared/httpd/*/htdocs/">
|
|
||||||
DirectoryIndex index.php index.html
|
|
||||||
|
|
||||||
AllowOverride All
|
|
||||||
Options All
|
|
||||||
|
|
||||||
RewriteEngine on
|
|
||||||
RewriteBase /
|
|
||||||
|
|
||||||
Order allow,deny
|
|
||||||
Allow from all
|
|
||||||
Require all granted
|
|
||||||
</Directory>
|
|
||||||
</VirtualHost>
|
|
@ -1,8 +0,0 @@
|
|||||||
charset utf-8;
|
|
||||||
|
|
||||||
send_timeout 60;
|
|
||||||
keepalive_timeout 10;
|
|
||||||
|
|
||||||
sendfile off;
|
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
@ -1,77 +0,0 @@
|
|||||||
##
|
|
||||||
## Default Host for http://localhost
|
|
||||||
##
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80 default_server;
|
|
||||||
server_name _;
|
|
||||||
server_name localhost;
|
|
||||||
server_name 127.0.0.1;
|
|
||||||
server_name httpd;
|
|
||||||
server_name 172.16.238.*;
|
|
||||||
|
|
||||||
# Root directive
|
|
||||||
root /var/www/default/htdocs;
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
access_log /var/log/nginx-mainline/devilbox-access.log main;
|
|
||||||
error_log /var/log/nginx-mainline/devilbox-error.log warn;
|
|
||||||
|
|
||||||
# Devilbox httpd info/status
|
|
||||||
location /devilbox-httpd-status {
|
|
||||||
stub_status on;
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Devilbox API endpoint
|
|
||||||
location ~ /devilbox-api/ {
|
|
||||||
root /var/www/default/api/;
|
|
||||||
index status.json;
|
|
||||||
|
|
||||||
# Allow cross-domain requests to this domain
|
|
||||||
# Used to validate if client DNS is setup correctly
|
|
||||||
if ( $http_origin ~* (https?://(localhost|127\.0\.0\.1|httpd)$) ) {
|
|
||||||
add_header "Access-Control-Allow-Origin" "$http_origin";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# 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 php: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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,67 +0,0 @@
|
|||||||
##
|
|
||||||
## Default Mass Virtual Host
|
|
||||||
##
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name ~^(?<domain>.+)\.[a-zA-Z]+$;
|
|
||||||
|
|
||||||
# Root directive
|
|
||||||
root /shared/httpd/$domain/htdocs/;
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
access_log /var/log/nginx-mainline/projects-access.log main;
|
|
||||||
error_log /var/log/nginx-mainline/projects-error.log warn;
|
|
||||||
|
|
||||||
# Devilbox API endpoint
|
|
||||||
location ~ /devilbox-api/ {
|
|
||||||
root /var/www/default/api/;
|
|
||||||
index status.json;
|
|
||||||
access_log off;
|
|
||||||
|
|
||||||
# Allow cross-domain requests to this domain
|
|
||||||
# Used to validate if client DNS is setup correctly
|
|
||||||
if ( $http_origin ~* (https?://(localhost|127\.0\.0\.1|httpd)$) ) {
|
|
||||||
add_header "Access-Control-Allow-Origin" "$http_origin";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Front-controller pattern as recommended by the nginx docs
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 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 php: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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
charset utf-8;
|
|
||||||
|
|
||||||
send_timeout 60;
|
|
||||||
keepalive_timeout 10;
|
|
||||||
|
|
||||||
sendfile off;
|
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
@ -1,75 +0,0 @@
|
|||||||
##
|
|
||||||
## Default Host for http://localhost
|
|
||||||
##
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80 default_server;
|
|
||||||
server_name _;
|
|
||||||
server_name localhost;
|
|
||||||
server_name 127.0.0.1;
|
|
||||||
server_name httpd;
|
|
||||||
server_name 172.16.238.*;
|
|
||||||
|
|
||||||
# Root directive
|
|
||||||
root /var/www/default/htdocs;
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
access_log /var/log/nginx-stable/devilbox-access.log main;
|
|
||||||
error_log /var/log/nginx-stable/devilbox-error.log warn;
|
|
||||||
|
|
||||||
# Devilbox httpd info/status
|
|
||||||
location /devilbox-httpd-status {
|
|
||||||
stub_status on;
|
|
||||||
access_log off;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Devilbox API endpoint
|
|
||||||
location ~ /devilbox-api/ {
|
|
||||||
root /var/www/default/api/;
|
|
||||||
index status.json;
|
|
||||||
|
|
||||||
# Allow cross-domain requests to this domain
|
|
||||||
# Used to validate if client DNS is setup correctly
|
|
||||||
if ( $http_origin ~* (https?://(localhost|127\.0\.0\.1|httpd)$) ) {
|
|
||||||
add_header "Access-Control-Allow-Origin" "$http_origin";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# 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 php: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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,67 +0,0 @@
|
|||||||
##
|
|
||||||
## Default Mass Virtual Host
|
|
||||||
##
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name ~^(?<domain>.+)\.[a-zA-Z]+$;
|
|
||||||
|
|
||||||
# Root directive
|
|
||||||
root /shared/httpd/$domain/htdocs/;
|
|
||||||
index index.php;
|
|
||||||
|
|
||||||
access_log /var/log/nginx-stable/projects-access.log main;
|
|
||||||
error_log /var/log/nginx-stable/projects-error.log warn;
|
|
||||||
|
|
||||||
# Devilbox API endpoint
|
|
||||||
location ~ /devilbox-api/ {
|
|
||||||
root /var/www/default/api/;
|
|
||||||
index status.json;
|
|
||||||
access_log off;
|
|
||||||
|
|
||||||
# Allow cross-domain requests to this domain
|
|
||||||
# Used to validate if client DNS is setup correctly
|
|
||||||
if ( $http_origin ~* (https?://(localhost|127\.0\.0\.1|httpd)$) ) {
|
|
||||||
add_header "Access-Control-Allow-Origin" "$http_origin";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Front-controller pattern as recommended by the nginx docs
|
|
||||||
location / {
|
|
||||||
try_files $uri $uri/ /index.php$is_args$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
# 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 php: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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -171,9 +171,11 @@ services:
|
|||||||
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
||||||
|
|
||||||
# Mount custom intranet
|
# Mount custom intranet
|
||||||
# (configured in /etc/${HTTPD_SERVER}/01-vhost-default.conf)
|
|
||||||
- ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro
|
- ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro
|
||||||
|
|
||||||
|
# Mount custom mass virtual hosting
|
||||||
|
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd
|
||||||
|
|
||||||
# Mount logs
|
# Mount logs
|
||||||
- ${DEVILBOX_PATH}/log/${PHP_SERVER}:/var/log/php
|
- ${DEVILBOX_PATH}/log/${PHP_SERVER}:/var/log/php
|
||||||
|
|
||||||
@ -194,10 +196,6 @@ services:
|
|||||||
# Mount devilbox user-defined bash config
|
# Mount devilbox user-defined bash config
|
||||||
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d
|
- ${DEVILBOX_PATH}/bash:/etc/bashrc-devilbox.d
|
||||||
|
|
||||||
# Mount custom mass virtual hosting
|
|
||||||
# (configured in /etc/${HTTPD_SERVER}/02-vhost-mass.conf)
|
|
||||||
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd
|
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- bind
|
- bind
|
||||||
|
|
||||||
@ -205,8 +203,8 @@ services:
|
|||||||
# HTTPD
|
# HTTPD
|
||||||
# ----------------------------------------
|
# ----------------------------------------
|
||||||
httpd:
|
httpd:
|
||||||
image: cytopia/${HTTPD_SERVER:-nginx-stable}:latest
|
#image: cytopia/${HTTPD_SERVER:-nginx-stable}:latest
|
||||||
#image: cytopia/${HTTPD_SERVER:-nginx-stable}:0.9
|
image: cytopia/${HTTPD_SERVER:-nginx-stable}:release-0.10
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
# Manually build via `docker-compose build`
|
# Manually build via `docker-compose build`
|
||||||
@ -219,13 +217,33 @@ services:
|
|||||||
##
|
##
|
||||||
## Debug?
|
## Debug?
|
||||||
##
|
##
|
||||||
- DEBUG_COMPOSE_ENTRYPOINT
|
- DEBUG_ENTRYPOINT=${DEBUG_COMPOSE_ENTRYPOINT}
|
||||||
|
- DEBUG_RUNTIME=${DEBUG_COMPOSE_ENTRYPOINT}
|
||||||
|
|
||||||
##
|
##
|
||||||
## Adjust timezone
|
## Adjust timezone
|
||||||
##
|
##
|
||||||
- TIMEZONE
|
- TIMEZONE
|
||||||
|
|
||||||
|
##
|
||||||
|
## UserID and GroupID
|
||||||
|
##
|
||||||
|
- NEW_UID
|
||||||
|
- NEW_GID
|
||||||
|
|
||||||
|
##
|
||||||
|
## Disable default vhost?
|
||||||
|
##
|
||||||
|
- VHOST_MAIN_DISABLE=${DEVILBOX_UI_DISABLE}
|
||||||
|
|
||||||
|
##
|
||||||
|
## Enable Mass Vhosts
|
||||||
|
##
|
||||||
|
- MASS_VHOST_ENABLE=1
|
||||||
|
- MASS_VHOST_TLD=.${TLD_SUFFIX}
|
||||||
|
- MASS_VHOST_DIR_SUFFIX=${HTTPD_DOCROOT_DIR}
|
||||||
|
- MASS_VHOST_TPL=${HTTPD_TEMPLATE_DIR}
|
||||||
|
|
||||||
##
|
##
|
||||||
## PHP-FPM Remote Server
|
## PHP-FPM Remote Server
|
||||||
##
|
##
|
||||||
@ -233,12 +251,6 @@ services:
|
|||||||
- PHP_FPM_SERVER_ADDR=php
|
- PHP_FPM_SERVER_ADDR=php
|
||||||
- PHP_FPM_SERVER_PORT=9000
|
- PHP_FPM_SERVER_PORT=9000
|
||||||
|
|
||||||
## Tell the webserver to look into this directory
|
|
||||||
## for additional configuration files.
|
|
||||||
##
|
|
||||||
## @see volumes:: - ./etc/${HTTPD_SERVER}:/etc/${HTTPD_SERVER}
|
|
||||||
- CUSTOM_HTTPD_CONF_DIR=/etc/${HTTPD_SERVER}
|
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
# ---- Format: ----
|
# ---- Format: ----
|
||||||
# [HOST-ADDR : ] HOST-PORT : DOCKER-PORT
|
# [HOST-ADDR : ] HOST-PORT : DOCKER-PORT
|
||||||
@ -252,27 +264,14 @@ services:
|
|||||||
# ---- Format: ----
|
# ---- Format: ----
|
||||||
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
# HOST-DIRECTORY : DOCKER-DIRECTORY
|
||||||
|
|
||||||
# Custom scripts/binaries required for httpd server vhost
|
|
||||||
# configuration to work.
|
|
||||||
# (configured in /etc/${HTTPD_SERVER}/02-vhost-mass.conf)
|
|
||||||
- ${DEVILBOX_PATH}/.devilbox/bin/${HTTPD_SERVER}:/opt/bin:ro
|
|
||||||
|
|
||||||
# Mount user-defined httpd configuration files
|
|
||||||
# @see environment::CUSTOM_HTTPD_CONF_DIR for how this
|
|
||||||
# is added in httpd server
|
|
||||||
- ${DEVILBOX_PATH}/.devilbox/etc/${HTTPD_SERVER}:/etc/${HTTPD_SERVER}:ro
|
|
||||||
|
|
||||||
# Mount custom intranet
|
# Mount custom intranet
|
||||||
# (configured in /etc/${HTTPD_SERVER}/01-vhost-default.conf)
|
|
||||||
- ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro
|
- ${DEVILBOX_PATH}/.devilbox/www:/var/www/default:ro
|
||||||
|
|
||||||
# Mount user-defined httpd log
|
|
||||||
# @see ./etc/${HTTPD_SERVER}/*.conf for log defines
|
|
||||||
- ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER}
|
|
||||||
|
|
||||||
# Mount custom mass virtual hosting
|
# Mount custom mass virtual hosting
|
||||||
# (configured in /etc/${HTTPD_SERVER}/02-vhost-mass.conf)
|
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd
|
||||||
- ${HOST_PATH_HTTPD_DATADIR}:/shared/httpd:ro
|
|
||||||
|
# Mount logs
|
||||||
|
- ${DEVILBOX_PATH}/log/${HTTPD_SERVER}:/var/log/${HTTPD_SERVER}
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- bind
|
- bind
|
||||||
|
Loading…
Reference in New Issue
Block a user