mirror of
https://github.com/cytopia/devilbox.git
synced 2025-04-08 11:34:14 +00:00
REL-0.9 Webserver configuration fixes
This commit is contained in:
parent
4f03b54463
commit
6c59070afb
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -3,6 +3,6 @@ charset utf-8;
|
||||
send_timeout 60;
|
||||
keepalive_timeout 10;
|
||||
|
||||
sendfile on;
|
||||
sendfile off;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
|
@ -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 / {
|
||||
|
@ -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?$ {
|
||||
|
||||
|
@ -3,6 +3,6 @@ charset utf-8;
|
||||
send_timeout 60;
|
||||
keepalive_timeout 10;
|
||||
|
||||
sendfile on;
|
||||
sendfile off;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
|
@ -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 / {
|
||||
|
@ -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?$ {
|
||||
|
||||
|
27
.devilbox/www/htdocs/info_httpd.php
Normal file
27
.devilbox/www/htdocs/info_httpd.php
Normal 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>
|
@ -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'
|
||||
|
@ -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`
|
||||
|
Loading…
x
Reference in New Issue
Block a user