REL-0.9 Webserver configuration fixes

This commit is contained in:
cytopia 2017-05-16 16:59:21 +02:00
parent 4f03b54463
commit 6c59070afb
No known key found for this signature in database
GPG Key ID: 6D56EDB8695128A2
11 changed files with 99 additions and 19 deletions

View File

@ -29,4 +29,12 @@ NameVirtualHost *:80
Order allow,deny
Allow from all
</Directory>
<Location /devilbox-httpd-status>
SetHandler server-status
Order allow,deny
Allow from all
</Location>
</VirtualHost>

View File

@ -30,4 +30,13 @@
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>

View File

@ -3,6 +3,6 @@ charset utf-8;
send_timeout 60;
keepalive_timeout 10;
sendfile on;
sendfile off;
tcp_nopush on;
tcp_nodelay on;

View File

@ -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 / {

View File

@ -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?$ {

View File

@ -3,6 +3,6 @@ charset utf-8;
send_timeout 60;
keepalive_timeout 10;
sendfile on;
sendfile off;
tcp_nopush on;
tcp_nodelay on;

View File

@ -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 / {

View File

@ -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?$ {

View File

@ -0,0 +1,27 @@
<?php require '../config.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php echo loadClass('Html')->getHead(); ?>
</head>
<body>
<?php echo loadClass('Html')->getNavbar(); ?>
<div class="container">
<h1>Httpd info</h1>
<br/>
<br/>
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12">
<iframe style="width:100%; height:100vh; position:relative;" src="/devilbox-httpd-status" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div><!-- /.container -->
<?php echo loadClass('Html')->getFooter(); ?>
</body>
</html>

View File

@ -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'

View File

@ -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`