diff --git a/.devilbox/etc/apache-2.2/01-vhost-default.conf b/.devilbox/etc/apache-2.2/01-vhost-default.conf index ce722d1e..ac558b50 100644 --- a/.devilbox/etc/apache-2.2/01-vhost-default.conf +++ b/.devilbox/etc/apache-2.2/01-vhost-default.conf @@ -29,4 +29,12 @@ NameVirtualHost *:80 Order allow,deny Allow from all + + + SetHandler server-status + + Order allow,deny + Allow from all + + diff --git a/.devilbox/etc/apache-2.4/01-vhost-default.conf b/.devilbox/etc/apache-2.4/01-vhost-default.conf index 0a899c9b..0fe252bb 100644 --- a/.devilbox/etc/apache-2.4/01-vhost-default.conf +++ b/.devilbox/etc/apache-2.4/01-vhost-default.conf @@ -30,4 +30,13 @@ Allow from all Require all granted + + + SetHandler server-status + + Order allow,deny + Allow from all + Require all granted + + diff --git a/.devilbox/etc/nginx-mainline/00-defaults.conf b/.devilbox/etc/nginx-mainline/00-defaults.conf index f4c3c90f..0dc048fe 100644 --- a/.devilbox/etc/nginx-mainline/00-defaults.conf +++ b/.devilbox/etc/nginx-mainline/00-defaults.conf @@ -3,6 +3,6 @@ charset utf-8; send_timeout 60; keepalive_timeout 10; -sendfile on; +sendfile off; tcp_nopush on; tcp_nodelay on; diff --git a/.devilbox/etc/nginx-mainline/01-vhost-default.conf b/.devilbox/etc/nginx-mainline/01-vhost-default.conf index 9d69af05..ce3f5c36 100644 --- a/.devilbox/etc/nginx-mainline/01-vhost-default.conf +++ b/.devilbox/etc/nginx-mainline/01-vhost-default.conf @@ -10,7 +10,6 @@ server { server_name httpd; server_name 172.16.238.*; - # Root directive root /var/www/default/htdocs; index index.php; @@ -18,6 +17,23 @@ server { 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 / { diff --git a/.devilbox/etc/nginx-mainline/02-vhost-mass.conf b/.devilbox/etc/nginx-mainline/02-vhost-mass.conf index 6caa3e87..934c7999 100644 --- a/.devilbox/etc/nginx-mainline/02-vhost-mass.conf +++ b/.devilbox/etc/nginx-mainline/02-vhost-mass.conf @@ -13,16 +13,11 @@ server { access_log /var/log/nginx-mainline/projects-access.log main; error_log /var/log/nginx-mainline/projects-error.log warn; - - # Front-controller pattern as recommended by the nginx docs - location / { - try_files $uri $uri/ /index.php; - } - # 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 @@ -31,6 +26,11 @@ server { } } + # Front-controller pattern as recommended by the nginx docs + location / { + try_files $uri $uri/ /index.php; + } + # PHP FPM location ~ \.php?$ { diff --git a/.devilbox/etc/nginx-stable/00-defaults.conf b/.devilbox/etc/nginx-stable/00-defaults.conf index f4c3c90f..0dc048fe 100644 --- a/.devilbox/etc/nginx-stable/00-defaults.conf +++ b/.devilbox/etc/nginx-stable/00-defaults.conf @@ -3,6 +3,6 @@ charset utf-8; send_timeout 60; keepalive_timeout 10; -sendfile on; +sendfile off; tcp_nopush on; tcp_nodelay on; diff --git a/.devilbox/etc/nginx-stable/01-vhost-default.conf b/.devilbox/etc/nginx-stable/01-vhost-default.conf index 40d8a562..933f2110 100644 --- a/.devilbox/etc/nginx-stable/01-vhost-default.conf +++ b/.devilbox/etc/nginx-stable/01-vhost-default.conf @@ -17,6 +17,23 @@ server { 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 / { diff --git a/.devilbox/etc/nginx-stable/02-vhost-mass.conf b/.devilbox/etc/nginx-stable/02-vhost-mass.conf index 8f3e2577..0f579ffd 100644 --- a/.devilbox/etc/nginx-stable/02-vhost-mass.conf +++ b/.devilbox/etc/nginx-stable/02-vhost-mass.conf @@ -13,16 +13,11 @@ server { access_log /var/log/nginx-stable/projects-access.log main; error_log /var/log/nginx-stable/projects-error.log warn; - - # Front-controller pattern as recommended by the nginx docs - location / { - try_files $uri $uri/ /index.php; - } - # 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 @@ -31,6 +26,11 @@ server { } } + # Front-controller pattern as recommended by the nginx docs + location / { + try_files $uri $uri/ /index.php; + } + # PHP FPM location ~ \.php?$ { diff --git a/.devilbox/www/htdocs/info_httpd.php b/.devilbox/www/htdocs/info_httpd.php new file mode 100644 index 00000000..67790ebc --- /dev/null +++ b/.devilbox/www/htdocs/info_httpd.php @@ -0,0 +1,27 @@ + + + + + getHead(); ?> + + + + getNavbar(); ?> + +
+ +

Httpd info

+
+
+ +
+
+ +
+
+ +
+ + getFooter(); ?> + + diff --git a/.devilbox/www/include/lib/Html.php b/.devilbox/www/include/lib/Html.php index 12d01cb3..1914933a 100644 --- a/.devilbox/www/include/lib/Html.php +++ b/.devilbox/www/include/lib/Html.php @@ -47,6 +47,10 @@ class Html array( 'name' => 'Info', 'menu' => array( + array( + 'name' => 'Httpd Info', + 'path' => '/info_httpd.php' + ), array( 'name' => 'PHP Info', 'path' => '/info_php.php' diff --git a/docker-compose.yml b/docker-compose.yml index 7ed6360b..031ecf00 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,8 +61,7 @@ services: # PHP-FPM # ---------------------------------------- php: - # TODO: remove latest, once it is ready for the next release - #image: cytopia/${PHP_SERVER:-php-fpm-5.4}:latest + #image: cytopia/${PHP_SERVER:-php-fpm-7.0}:latest image: cytopia/${PHP_SERVER:-php-fpm-7.0}:release-0.9 restart: always @@ -180,8 +179,8 @@ services: # HTTPD # ---------------------------------------- httpd: - # TODO: remove latest, once it is ready for the next release - image: cytopia/${HTTPD_SERVER:-nginx-mainline}:latest + #image: cytopia/${HTTPD_SERVER:-nginx-stable}:latest + image: cytopia/${HTTPD_SERVER:-nginx-stable}:release-0.9 restart: always # Manually build via `docker-compose build`